CrashLoopBackOff
The container starts, exits and is restarted with a growing delay. Find the reason in the previous attempt's logs and its exit code.
Troubleshooting guide · OOMKilled
OOMKilled means a container used more memory than its limit allowed, and the kernel killed it with SIGKILL — which is why it exits with code 137. The fix is either a limit that matches the container's real peak, or an application that uses less; raising the limit blindly only moves the problem.
Updated
A container's memory limit is enforced by the kernel. When the processes inside it try to use more than the limit, the kernel's out-of-memory killer stops one of them with SIGKILL, and the kubelet records the container's termination reason as OOMKilled with exit code 137 (128 + 9). If the pod restarts it and it happens again, the pod goes into CrashLoopBackOff.
It is not the same as an eviction. When a whole node runs short of memory, the kubelet evicts pods to protect the node, and those pods end with the reason Evicted. OOMKilled is about one container and its own limit.
Last State should read Terminated, Reason: OOMKilled, Exit Code: 137:
kubectl describe pod <pod> -n <namespace>
The same fact, for every container in the pod, without the rest of describe:
kubectl get pod <pod> -n <namespace> -o jsonpath='{range .status.containerStatuses[*]}{.name}{"\t"}{.lastState.terminated.reason}{"\n"}{end}'
The requests and limits the container was given:
kubectl get pod <pod> -n <namespace> -o jsonpath='{range .spec.containers[*]}{.name}{"\t"}{.resources}{"\n"}{end}'
An exit code of 137 without the OOMKilled reason is a different problem: the container was killed, but not for memory — typically a liveness probe, or a shutdown that outlasted its grace period. Raising the memory limit will not help.
A limit should sit above the container's real peak, and the only way to know the peak is to measure it under realistic load. With metrics-server installed:
Current memory per container:
kubectl top pod <pod> -n <namespace> --containers
In PodSteer
Read next
The container starts, exits and is restarted with a growing delay. Find the reason in the previous attempt's logs and its exit code.
No node can take the pod. The scheduler's FailedScheduling event names every constraint that ruled a node out.
The node cannot fetch the container image. The event message says whether the image is missing, the registry refused, or it could not be reached.