zoukankan      html  css  js  c++  java
  • k8s集群移除node

    先drain节点上的pod
    使用kubectl drain node03 --delete-local-data --force --ignore-daemonsets
    之后删除node

    [root@master01 ~]# kg node
    NAME       STATUS   ROLES    AGE   VERSION
    master01   Ready    master   97d   v1.18.2
    master02   Ready    master   97d   v1.18.2
    master03   Ready    master   97d   v1.18.2
    node01     Ready    <none>   97d   v1.18.2
    node02     Ready    <none>   92d   v1.18.2
    node03     Ready    <none>   91d   v1.18.2
    [root@master01 ~]# kubectl drain node03 --delete-local-data --force --ignore-daemonsets
    node/node03 cordoned
    WARNING: ignoring DaemonSet-managed Pods: kube-system/calico-node-vv7nj, kube-system/kube-proxy-gtg5v
    evicting pod default/my-test01-68c4c897cb-hl2np
    pod/my-test01-68c4c897cb-hl2np evicted
    node/node03 evicted
    [root@master01 ~]# kubectl get nodes
    NAME       STATUS                     ROLES    AGE   VERSION
    master01   Ready                      master   97d   v1.18.2
    master02   Ready                      master   97d   v1.18.2
    master03   Ready                      master   97d   v1.18.2
    node01     Ready                      <none>   97d   v1.18.2
    node02     Ready                      <none>   92d   v1.18.2
    node03     Ready,SchedulingDisabled   <none>   91d   v1.18.2
    [root@master01 ~]# kubectl delete node node03
    node "node03" deleted
    [root@master01 ~]# kubectl get nodes
    NAME       STATUS   ROLES    AGE   VERSION
    master01   Ready    master   97d   v1.18.2
    master02   Ready    master   97d   v1.18.2
    master03   Ready    master   97d   v1.18.2
    node01     Ready    <none>   97d   v1.18.2
    node02     Ready    <none>   92d   v1.18.2
    [root@master01 ~]# 
    
    本人水平有限,还在不断学习中 难免有很多错误或者遗漏,望见谅
  • 相关阅读:
    100个高质量的photoshop画笔
    VC调用DLL库方法的方法
    VC6中使用CHtmlView在对话框控制中显示HTML
    CtrlList 排序问题。
    VC ADO使用说明
    VC右键弹出菜单的实现
    VC6工程项目文件说明
    VC6中用DOM遍历网页中的元素
    C/C++头文件一览
    最常见的20种VC++编译错误信息
  • 原文地址:https://www.cnblogs.com/faberbeta/p/14410038.html
Copyright © 2011-2022 走看看