k8s之重启节点

2020-09-27
1.查看节点状态
kubectrl get nodes

2.设置节点为不可调度状态
kubectl cordon k8s-node1

$ kubectl get node
NAME                 STATUS                     ROLES    AGE    VERSION
k8s-node1     Ready,SchedulingDisabled      191d   v1.16.1

3.驱逐节点上的pods
kubectrl drain k8s-node01 --delete-local-data --ignore-daemonsets

  1. 节点重启后恢复为可调度状态
    kubectl uncordon k8s-node1

你可能感兴趣的:(k8s之重启节点)