Interview Prep/Kubernetes/Resources, OOM, probes and termination

Many Pods on one node were killed at once and the node shows a `SystemOOM` event. Container limits were not reached.

AdvancedTroubleshootingResources, OOM, probes and termination
Answer

Likely causes → The node itself ran out of memory. Pods with limits much higher than requests (Burstable) overcommitted the node; the kernel OOM killer picked victims by oom_score_adj (BestEffort first, then Burstable) before the kubelet could evict gracefully. Also: system daemons with no reservation.

Diagnose →

kubectl get events --field-selector reason=SystemOOM -A
kubectl debug node/ip-10-0-1-9 -it --image=ubuntu:24.04 -- chroot /host dmesg -T | grep -i 'killed process'
kubectl describe node ip-10-0-1-9 | grep -A8 'Allocated resources'   # memory limits % >> 100%

Fix → Bring memory limits closer to requests, set kubeReserved/systemReserved and a hard eviction threshold (memory.available<500Mi) so the kubelet evicts before the kernel kills.

Prevent → Monitor memory limit overcommit per node; keep requests realistic so the scheduler does not pack nodes beyond physical RAM.

All Kubernetes questions Roadmap: Kubernetes core

More on Resources, OOM, probes and termination