Kubernetes Errors Explained: Causes and Fixes
Plain guides to common Kubernetes errors such as CrashLoopBackOff, OOMKilled, ImagePullBackOff and NotReady nodes. What each means and how to fix it.
| What you see | Most common cause | First fix to try |
|---|---|---|
| CrashLoopBackOff | The app exits on start | Fix the config and redeploy |
| OOMKilled | The limit is lower than normal use | Raise the memory limit |
| ImagePullBackOff | The tag or name does not exist | Correct the image reference |
| CreateContainerConfigError | The ConfigMap or Secret does not exist | Create the missing object or key |
| CreateContainerError | No command to run | Set command in the pod spec |
| Pending (FailedScheduling) | Not enough CPU or memory requested room | Lower the requests |
| Evicted | Pod went over its ephemeral-storage limit | Set ephemeral-storage requests and limits |
| ContainerCreating | Secret or ConfigMap volume is missing | Create the missing Secret or ConfigMap |
| Liveness probe failed / Readiness probe failed | Wrong path, port or scheme | Point the probe at the right endpoint |
| NotReady | Kubelet stopped or crashed | Restart the kubelet or runtime |
| Exit Code 137 / Exit Code 143 | 137 with reason OOMKilled | Make the app the process that gets SIGTERM |
| Init:CrashLoopBackOff | Wait-for-dependency script gives up | Fix or create the dependency |
| 502 Bad Gateway / 503 Service Unavailable | The Service selector matches no pods | Make the selector match the pod labels |
| Helm UPGRADE FAILED | A previous helm run was interrupted | Roll back to the last good revision |
| Argo CD OutOfSync / Degraded | Nobody has synced the app yet | Review the diff and sync |
| CPU throttling | The CPU limit is below what the app needs at peak | Raise the CPU limit |
| PVC Pending | The StorageClass does not exist | Recreate the claim with the right StorageClass |
| Service has no endpoints | The selector matches no pods | Fix the selector or the pod labels |
| DNS resolution failed (CoreDNS) | CoreDNS has no ready pods | Get CoreDNS running again |
- CrashLoopBackOff
CrashLoopBackOff is not the error itself. It means the container keeps exiting and the kubelet is waiting longer before each restart. The real cause is in the previous container's logs and its exit code.
- OOMKilled
OOMKilled means the Linux OOM killer stopped your container because it used more memory than allowed. Usually that is the container's own memory limit. Sometimes the whole node ran out of memory.
- ImagePullBackOff
The node tried to pull the container image and failed. ErrImagePull is the first failure. ImagePullBackOff means the kubelet is now waiting before it tries again. The exact reason is in the pod's events.
- CreateContainerConfigError
The kubelet could not put together the container's settings, so it never asked the runtime to create it. Most of the time a ConfigMap, Secret or key that the pod references does not exist. The waiting message names it.
- CreateContainerError
The kubelet asked the container runtime to create the container and the runtime refused. The waiting message holds the runtime's own error. A wrong binary path usually shows as RunContainerError or StartError, not this status.
- Pending (FailedScheduling)
The scheduler could not find a node for the pod. The FailedScheduling event says why for every node, for example Insufficient cpu or an untolerated taint. Fix that constraint or add a node that meets it.
- Evicted
An evicted pod was stopped by the kubelet, usually because the node ran short of memory or disk, or because the pod used more ephemeral storage than its limit. The pod is left in Failed phase with reason Evicted and a message that says which.
- ContainerCreating
The pod is on a node but the kubelet cannot finish setting it up. A volume that will not mount, a network plugin error or a slow image pull are the usual causes. The pod's events show which one.
- Liveness probe failed / Readiness probe failed
A failed liveness probe makes the kubelet kill and restart the container. A failed readiness probe only removes the pod from Service endpoints, with no restart. The Unhealthy event tells you which probe failed and how.
- NotReady
NotReady means the node's Ready condition is False or Unknown. Unknown means the control plane stopped hearing from the kubelet. False means the kubelet is reporting a problem itself, such as a broken runtime or network plugin.
- Exit Code 137 / Exit Code 143
An exit code above 128 means the process was ended by a signal: 143 is 128 plus 15 (SIGTERM) and 137 is 128 plus 9 (SIGKILL). Exit code 137 only means OOM when the reason field says OOMKilled.
- Init:CrashLoopBackOff
One of the pod's init containers exits with an error and is restarted with back-off. The main containers will not start until every init container succeeds. Use kubectl logs with -c and the init container's name to see why.
- 502 Bad Gateway / 503 Service Unavailable
A 503 from the ingress usually means the Service has no ready endpoints, so there is no pod to send the request to. A 502 means the controller picked a pod but the connection failed or the reply was cut off. The controller's log says which.
- Helm UPGRADE FAILED
Helm prints UPGRADE FAILED for several different problems. The text after it names the real one: another operation is in progress, context deadline exceeded or a field Kubernetes will not change. The release history shows the state each revision was left in.
- Argo CD OutOfSync / Degraded
Argo CD shows two separate statuses. Sync status compares the cluster with Git. OutOfSync means they differ. Health status looks at the live objects. Degraded means one of them is failing, even when the app is Synced.
- CPU throttling
A CPU limit gives the container a fixed slice of CPU time in every 100ms period. When it uses that slice up, the kernel pauses it until the next period starts, even if the node has idle CPU. There is no error or event. The app is just slow.
- PVC Pending
A PersistentVolumeClaim in Pending has no volume bound to it yet. Either nothing can make a volume for it, or its StorageClass is waiting for a pod to use it first. The claim's own events say which.
- Service has no endpoints
Most of the time the Service has no ready endpoints, or it sends traffic to a port the app does not listen on. Run kubectl get endpoints for the Service first. An empty list points at the selector or readiness. An address with the wrong port points at targetPort.
- DNS resolution failed (CoreDNS)
Pods resolve names through the kube-dns Service, which sends queries to the CoreDNS pods. A timeout means the pod cannot reach CoreDNS or no CoreDNS pod is ready. NXDOMAIN or SERVFAIL means CoreDNS did answer, so look at the name, the search path or the upstream resolver.
Frequently asked questions
Is there a Kubernetes troubleshooting guide for common errors?
Yes. This section has one page per error, such as CrashLoopBackOff, OOMKilled, ImagePullBackOff and Pending. Each page shows real output from a lab cluster, the causes in order and the fixes with their trade-offs.
Which kubectl commands help most when debugging?
kubectl describe pod shows events and each container's last state. kubectl logs with --previous shows the output of the container that just exited. kubectl debug adds a debug container to a running pod when the image has no shell.
What should a Kubernetes runbook include?
For each error, the signal that identifies it, the commands to run in order and the fixes with their risks. Note where the evidence lives, such as events, previous logs and node conditions. Events are only kept for about an hour by default, so save them early.
How do I find which pods are failing in a cluster?
Run kubectl get pods -A and look for any status other than Running or Completed, or a high restart count. Then run kubectl get events -A with --sort-by=.lastTimestamp to see the latest warnings.
Last updated . Try KubeGraf Freemium.