The pod shows `OOMKilled`. Diagnose and fix it.
BeginnerHands-onLive debugging tasks
Answer
kubectl describe pod api-7d9f | grep -A3 'Last State' # Reason: OOMKilled, Exit Code: 137
kubectl top pod api-7d9f --containers # current usage vs limit
kubectl get pod api-7d9f -o jsonpath='{.spec.containers[0].resources}'
Fix: raise resources.limits.memory to match the real peak (from metrics, not a guess), or fix the app. For the JVM, set -XX:MaxRAMPercentage=75 so the heap fits inside the limit; for Node, --max-old-space-size.
Key trick → OOMKilled means the container exceeded its memory limit, enforced by the kernel cgroup. Raising requests doesn't help; the limit, or the app's memory use, has to change.
More on Live debugging tasks
A pod is in CrashLoopBackOff. You have 10 minutes. Walk through your commands.BeginnerA pod is stuck in `ImagePullBackOff`. Fix it.BeginnerA pod is `Pending` forever. What do you check?AdvancedThe Service returns "connection refused" but pods are Running. Debug it.IntermediateA Docker container exits immediately after `docker run -d`. Find out why.Beginner`docker build` fails with "COPY failed: file not found in build context". Fix it.Beginner