A pod shows OOMKilled — what does it mean and how do you fix it?
Quick Answer
The container exceeded its memory limit, so the kernel cgroup OOM killer terminated it (exit code 137). Fix by inspecting real usage, raising limits.memory (in Mi/Gi), fixing leaks, or right-sizing the app (e.g., JVM heap).
Detailed Answer
Confirm with kubectl describe pod (State: Terminated, Reason: OOMKilled) and kubectl top pod for actual usage. Root causes: limit set too low, a memory leak, or the app not respecting the cgroup limit. Fixes: increase limits.memory using binary units, tune the runtime (JVM -XX:MaxRAMPercentage), add a memory request so the scheduler places it correctly, and add alerts on usage approaching the limit.
Code Example
kubectl describe pod <pod> | grep -A3 State kubectl top pod <pod> --containers
Interview Tip
Say exit code 137 and that the cgroup limit is enforced in bytes — then mention Mi/Gi units, a common follow-up.