k8s 节点状态
k8s 节点状态
1.1 k8s集群节点状态变成NotReady,SchedulingDisabled
# kubectl get node
NAME STATUS ROLES AGE VERSION
master-1 NotReady <none> 2d1h v1.18.6
node-3 NotReady <none> 47h v1.18.6
node-4 NotReady,SchedulingDisabled <none> 2d v1.18.6
node-5 NotReady,SchedulingDisabled <none> 47h v1.18.6
解决:
NotReady,是因为kubelet服务与kube-apiserver没有正常通信,需要检查kube-apiserver,kubelet服务是否正常。
SchedulingDisabled,是因为节点被隔离,需要uncordon节点
# systemctl stop kube-apiserver
# systemctl start kube-apiserver
# systemctl restart kubelet
# kubectl uncordon node-4