Repaso
Español
Cloud & DevOpsIntermediateOPS-48

A Pod shows CrashLoopBackOff. What does it mean and how do you start debugging?

Options

  1. The container keeps crashing and restarting; read logs --previous (Correct option)
  2. The node is out of disk space and cannot start pods
  3. The image is still being downloaded from the registry
  4. The Service has no IP address, so the Pod cannot start

Answer

The container keeps starting and crashing; Kubernetes retries with growing delays. Check kubectl logs --previous and kubectl describe pod

Why

CrashLoopBackOff = the container starts, exits with an error, Kubernetes restarts it, and waits longer after each failure.

Typical causes: application error at startup (bad config, missing env var), cannot connect to the database, wrong command, out of memory (OOMKilled) or a failing liveness probe.

Steps: kubectl logs <pod> --previous (output of the crashed run), kubectl describe pod <pod> (events and exit code), check ConfigMap/Secret values and resource limits.

Remember

CrashLoopBackOff: read logs --previous and describe.

Key terms

Practice this question in Repaso