OOMKilled
The container used more memory than its limit and the kernel killed it. Confirm it, measure the real peak, then size the limit or fix the leak.
Troubleshooting guide · CrashLoopBackOff
CrashLoopBackOff is not an error of its own: it is the kubelet waiting before it restarts a container that keeps exiting. The reason is almost always in the logs of the attempt that just died — kubectl logs --previous — and in the exit code kubectl describe pod reports for it.
Updated
A container in a pod whose restart policy is Always or OnFailure is restarted whenever it exits. When it keeps exiting, the kubelet waits longer before each restart — an exponential back-off that starts at ten seconds and is capped at five minutes — and while it is waiting, the pod reports CrashLoopBackOff. Once a container has run for ten minutes without trouble, the back-off resets.
So the status tells you only that the container keeps stopping. Whatever made it stop happened in the previous attempt, which is why the current container's logs are usually empty and the useful ones are one restart back.
Three commands answer it in nearly every case. Run them in this order.
The restart count, and which pods are affected:
kubectl get pods -n <namespace>
The container's Last State: its termination reason, exit code and when it finished. The Events at the bottom show probe failures and back-off messages:
kubectl describe pod <pod> -n <namespace>
The logs of the attempt that crashed, not the one waiting to start. Add -c <container> when the pod has more than one:
kubectl logs <pod> -n <namespace> --previous
The exit code in Last State narrows the cause before you have read a log line. A code above 128 means the process was killed by a signal: subtract 128 to get the signal's number.
After a fix, a Deployment rolls out new pods on its own. For an unmanaged pod, delete it so its controller recreates it, or restart the workload:
Restart every pod of a Deployment, one batch at a time:
kubectl rollout restart deployment/<name> -n <namespace>
Watch the new pods come up:
kubectl get pods -n <namespace> -w
In PodSteer
Read next
The container used more memory than its limit and the kernel killed it. Confirm it, measure the real peak, then size the limit or fix the leak.
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.
No node can take the pod. The scheduler's FailedScheduling event names every constraint that ruled a node out.