How to Fix Node Not Ready in Kubernetes Quickly
Node Not Ready status in Kubernetes means the node is not healthy or unreachable. To fix it, check the node's kubelet service, network connectivity, and resource usage, then restart kubelet or fix the root cause. Use kubectl describe node [node-name] to find detailed errors.Why This Happens
A Kubernetes node shows Not Ready when the node's health checks fail or it cannot communicate with the control plane. Common causes include the kubelet service crashing, network issues, or resource exhaustion like disk pressure.
kubectl get nodes NAME STATUS ROLES AGE VERSION worker-node1 NotReady <none> 10d v1.26.0
The Fix
First, check the node details with kubectl describe node [node-name] to see error messages. Then, SSH into the node and check if the kubelet service is running. Restart it if needed. Also, verify network connectivity and disk space. Fix any resource pressure or network issues found.
kubectl describe node worker-node1
# On the node
sudo systemctl status kubelet
sudo systemctl restart kubelet
# Check disk space
df -h
# Check network
ping -c 3 <control-plane-ip>Prevention
Keep your nodes healthy by monitoring resource usage and network status regularly. Use automated alerts for disk pressure or kubelet failures. Ensure kubelet and Kubernetes versions are up to date. Use node auto-repair features if your cloud provider supports them.
Related Errors
- Node Not Ready due to Disk Pressure: Free up disk space or increase disk size.
- Node Not Ready due to Network: Check firewall rules and network plugins.
- Kubelet CrashLoop: Inspect kubelet logs with
journalctl -u kubeletand fix config errors.