K8s - X - 2 设置/取消节点不可调度
一、kubernetes 设置/取消节点不可调度
1. 问题描述
查看集群节点(kubectl get nodes
)时发现存在节点处于不可调度状态:
NAME STATUS ROLES AGE VERSION
server-230 Ready control-plane,master 29h v1.20.9
server-231 Ready,SchedulingDisabled control-plane,master 28h v1.20.9
server-232 Ready control-plane,master 29h v1.20.4
2. 解决方案
2.1 取消节点不可调度
kubectl uncordon server-231
输出内容:
node/server-231 uncordoned
再次查看(kubectl get nodes
):
NAME STATUS ROLES AGE VERSION
server-230 Ready control-plane,master 29h v1.20.9
server-231 Ready control-plane,master 28h v1.20.9
server-232 Ready control-plane,master 29h v1.20.4
2.3 其他
设置节点不可调度:
kubectl cordon server-231