Kubernetes Node Not Ready? Here’s How to Fix It! 🚑

So, your Kubernetes node has decided to go on a coffee break and is showing up as NotReady? Don’t worry, we’ve all been there! In this guide, we’ll dive into why this happens, how to diagnose the issue, and—most importantly—how to fix it.
Let’s get that node back in action! 🚀
When you run:

You might see something like this:

🛠️ What’s the Kubelet Up To?
Each node has a kubelet, which is basically the Kubernetes babysitter. It reports on:
• ✅ Whether the container runtime’s network is working
• ✅ If the Container Storage Interface (CSI) is properly set up
• ✅ The health of the container runtime
• ✅ If the node is shutting down
• ✅ Availability of CPU, memory, and pod capacity
If something goes wrong, the control plane marks the node as NotReady and waves a little red flag at you. 🚩
🕵️♂️ Step-by-Step Diagnosis
Run:

If the node is marked NotReady, we move to the next step.
2️⃣ Get More Details
To understand why it’s NotReady, run:

This will tell you:
• MemoryPressure: Node is low on memory
• DiskPressure: Running out of disk space
• PIDPressure: Too many processes running
• Kubelet Not Ready: Something’s up with the kubelet
Example output:

🔴 Issue detected! “PLEG is not healthy.” Time to investigate further!
3️⃣ Check Network Connectivity
Run:

If you see 100% packet loss, then congratulations! You’ve found a network issue. 🎉
4️⃣ Check if Kubelet is Running
On the node itself, run:

If you see something like this: Active: inactive (dead)
Well, that explains it! Your kubelet is taking a nap. 😴
5️⃣ Check Kube-proxy

If kube-proxy is stuck in CrashLoopBackOff, it might be causing connectivity issues.
🛠️ Fixing the NotReady Node
Now, let’s bring your node back to life! ⚡
🏗️ 1. Fix Resource Issues
• Increase Resources: Scale up the node or optimize pod requests/limits
• Monitor & Clean: Run top or htop to identify resource hogs
• Clear Disk Space: Remove unused images and logs
🔄 2. Restart the Kubelet
If kubelet is dead, revive it with:

If it refuses to wake up, check logs: sudo cat /var/log/kubelet.log
🔌 3. Fix Network Issues
• Check firewall rules: Ensure necessary ports are open
• Test connections:

• Restart kube-proxy:

🎯 Final Thoughts:
Repairing a NotReady node is allabout being a Kubernetes detective.🕵️♀️ With somecareful steps, you can troubleshoot the problem and have your cluster runningagain.
The next time your node feelslikeitneeds a holiday, you'll be ready 🚀
Happy troubleshooting! 🎉