Use this procedure to check if a Kubernetes master or worker node is in a NotReady state.
The kubectl get nodes
command returns a NotReady state for a master or worker node.
-
Run the
kubectl get nodes
command to identify the node in NotReady state.kubectl get nodes NAME STATUS ROLES AGE VERSION ncn-m001 Ready control-plane,master 27h v1.20.13 ncn-m002 Ready control-plane,master 8d v1.20.13 ncn-m003 Ready control-plane,master 8d v1.20.13 ncn-w001 NotReady <none> 8d v1.20.13 ncn-w002 Ready <none> 8d v1.20.13 ncn-w003 Ready <none> 8d v1.20.13
-
Ensure the node does not have an intentional
NoSchedule
taint.See About Kubernetes Taints and Labels for more information about tainting and untainting a node.
If the node in question is not intentionally tainted causing the
NotReady
state, proceed to the next step and attempt to restart kubelet. -
Restart the kubelet.
Run the following command on the node in a NotReady state.
systemctl restart kubelet
Try running the kubectl get nodes
command and ensure the node is now in a Ready state.