Pcornel
Browse topics
Options
Recent
Favorites
Containers · Technical reference

CrashLoopBackOff

Direct answer

CrashLoopBackOff means a container keeps exiting and Kubernetes waits longer before each restart.

When to use this

Use it when a pod is in CrashLoopBackOff.

First 30 seconds

1. kubectl logs <pod> --previous.

2. Exit code/reason: kubectl describe pod (Last State).

3. OOMKilled → raise limit or fix memory use.

4. Missing config/secret/volume → events.

5. Liveness probe too strict?

Operational verification

container starts → exits → backoff → restart

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Docker / containerd / Podman / Kubernetes / OCI-compatible platforms
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformDocker / containerd / Podman / Kubernetes / OCI-compatible platforms
Key commandkubectl describe pod <pod>
Scope / prerequisiteUse it when a pod is in CrashLoopBackOff.
What next?2 suggested next steps
Evidence0
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

3 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 How to verify Verify boundary

Read previous logs and the exit reason. Check command and args, required environment variables and mounted files. Run the image locally with the same configuration to reproduce.

Step 2 Finding the cause Verify boundary
kubectl describe pod <pod>              # Last State: Terminated, Reason, Exit Code
kubectl logs <pod> --previous
kubectl get events --sort-by=.lastTimestamp
Exit codeUsual cause
1 / app-specificApplication error, missing config/secret
137OOMKilled (memory limit) or SIGKILL
139Segfault
143SIGTERM (e.g. failed liveness probe)

Also check liveness probes that fail too early and commands that exit immediately.

Step 3 Common failures Narrow the fault

A wrong command or missing configuration file exits immediately. A liveness probe that fails too early looks like a crash loop. Missing dependencies such as an unreachable database often cause quick exits.

Key points

The cause is in the previous container's logs and exit code: app error (1), misconfiguration, missing config/secret, OOMKilled (137), failing liveness probe.

Key checks
  • kubectl get pods -o wide — pods, status, node, IP
  • kubectl describe pod <pod> — events and conditions
  • kubectl logs <pod> [-c <c>] [--previous] — container logs (incl. previous crash)
  • kubectl get events --sort-by=.lastTimestamp — recent cluster events
ReferenceWhat it is1 section · depth on demand

How it works

The kubelet restarts the container according to restartPolicy and applies exponential backoff. The container may run for only a moment, so live logs are often empty; --previous shows the terminated instance.

ReferenceImportant terms & boundaries2 sections · depth on demand

In depth

The backoff schedule

After each exit the kubelet waits longer before the next start: 10 s, 20 s, 40 s … capped at 5 minutes, and the delay resets after the container runs successfully for 10 minutes. A Pod in CrashLoopBackOff is therefore usually waiting, not failing right now.

A five-step diagnosis

kubectl get pod api-7f… -o wide                   # RESTARTS count and node
kubectl describe pod api-7f… | sed -n '/Last State/,/Ready/p'
#   Last State: Terminated  Reason: Error  Exit Code: 1  Finished: …
kubectl logs api-7f… --previous --tail=50          # output of the crashed instance
kubectl get events --field-selector involvedObject.name=api-7f… --sort-by=.lastTimestamp
kubectl get pod api-7f… -o yaml | grep -A5 -E 'command:|args:|envFrom:|volumeMounts:'

Mapping the evidence to a cause

EvidenceLikely causeNext step
Exit 1 + stack trace in --previousApplication error at start-upFix config or code
Exit 1, log says missing file/variableConfigMap/Secret key or mount path wrongCompare manifest with what the app expects
Reason: OOMKilled, exit 137Memory limit too low or leakRaise limit or profile memory
Exit 137/143 with Unhealthy liveness eventsLiveness probe kills a slow startAdd a startup probe
Exit 0 repeatedlyProcess finishes — wrong command for a long-running PodUse a Job, or fix the entrypoint
Empty --previous logs, exit 127/126Command not found / not executableCheck image entrypoint and architecture

Reproduce without the crash loop

kubectl debug api-7f… -it --copy-to=api-debug --container=api -- sh starts a copy with a shell instead of the entrypoint, so you can run the start command by hand and watch it fail.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Common mistakes

  • Restarting the pod without reading kubectl logs --previous.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
crashloopbackoffcrashloopbackoffkubectl logs previous
Confirmation

Confirm action

Continue?