Skip to main content
Course/Troubleshooting/Troubleshooting Nodes
3/475 min
Troubleshooting

Troubleshooting Nodes

Diagnose NotReady nodes by reading kubelet logs, inspecting node conditions, and safely cordoning and draining problem nodes.

advanced75 minRead β†’ Lab β†’ Quiz β†’ Practice
🧠 Brain Warm-Up
🧠 Brain Warm-Up: A node goes NotReady. You have 10 pods on it. Without any intervention, what happens to those pods? How long before Kubernetes tries to reschedule them? What is the mechanism β€” and what do node taints have to do with it?

Node Conditions β€” The Diagnostic Map

kubectl describe node <node-name>
# Look for the Conditions section:
Conditions:
  Type              Status  Reason                 Message
  ────────────────  ──────  ─────────────────────  ──────────────────────────────────
  MemoryPressure    False   KubeletHasSufficientMemory  kubelet has sufficient memory
  DiskPressure      False   KubeletHasNoDiskPressure    kubelet has no disk pressure
  PIDPressure       False   KubeletHasSufficientPID     kubelet has sufficient PID
  Ready             True    KubeletReady            kubelet is posting ready status

A healthy node shows: MemoryPressure=False, DiskPressure=False, PIDPressure=False, Ready=True.

NotReady root causes:

ConditionStatus=TrueRoot CauseFix
MemoryPressureTrueNode RAM >~85% fullEvict pods, add memory
DiskPressureTrueNode disk >~85% fullClean images (crictl rmi), remove old logs
PIDPressureTrueToo many processes (>PID max)Kill runaway processes
NetworkUnavailableTrueCNI plugin failedRestart CNI, check node network config
ReadyFalsekubelet stoppedsystemctl restart kubelet

Kubelet Diagnostics

When a node is NotReady, the kubelet is either dead or reporting failure. Always check:

# On the node itself (via SSH or kubectl exec if accessible)
systemctl status kubelet
journalctl -u kubelet -n 50 --no-pager
journalctl -u kubelet --since "10 minutes ago" --no-pager

Common kubelet log errors:

# Certificate expired
E0605 10:00:00 kubelet.go:2448] Error getting node: Unauthorized
# β†’ Rotate kubelet certificates

# Can't connect to API server
E0605 10:00:00 kubelet.go:2448] Unable to register node with API server
# β†’ Check network connectivity to control plane, check kube-apiserver health

# Config error
Failed to load kubelet config file /var/lib/kubelet/config.yaml
# β†’ Check kubelet config syntax

# CNI plugin failure
NetworkPlugin cni failed to set up pod network
# β†’ Check CNI pod in kube-system is running

Node Maintenance β€” Cordon and Drain

kubectl cordon <node>      # Marks node Unschedulable
                           # βœ“ Existing pods keep running
                           # βœ— New pods will not schedule here

kubectl drain <node>       # Cordons + evicts all evictable pods
  --ignore-daemonsets      # Required: DaemonSet pods can't be moved
  --delete-emptydir-data   # Required if any pod uses emptyDir volumes
  --grace-period=30        # Seconds to wait for graceful termination
  --timeout=120s           # Abort if drain takes too long

kubectl uncordon <node>    # Marks node Schedulable again

What drain does NOT evict:

  • DaemonSet-managed pods (use --ignore-daemonsets to skip them)
  • Pods with a PodDisruptionBudget that would be violated (drain will block and wait)
  • Mirror pods (static pods managed by kubelet directly)

Pod Eviction After NotReady

When a node goes NotReady, Kubernetes taints it with node.kubernetes.io/not-ready:NoExecute. Pods have a default tolerationSeconds: 300 for this taint β€” they tolerate the taint for 5 minutes before being evicted and rescheduled elsewhere.