Interview Prep/Kubernetes/Nodes, kubelet and container runtime

Containers on a node fail with `fork: Resource temporarily unavailable` and the node shows `PIDPressure`.

AdvancedTroubleshootingNodes, kubelet and container runtime
Answer

Likely causes → PID exhaustion: a fork bomb, a leaking process spawner, or zombie processes because PID 1 in a container does not reap children.

Diagnose →

kubectl describe node ip-10-0-1-9 | grep PIDPressure
# On the node
ps -eo ppid,stat | awk '$2 ~ /Z/' | wc -l
ps -eo pid,comm --sort=-pid | head
cat /proc/sys/kernel/pid_max

Fix → Kill or restart the offending Pod. Add a proper init (tini, shareProcessNamespace or --init) so zombies are reaped.

Prevent → Set podPidsLimit in the kubelet config (e.g. 4096) so one Pod cannot exhaust the node.

All Kubernetes questions

More on Nodes, kubelet and container runtime