The init container nobody looks at
Init:CrashLoopBackOff hides the failure one container away from where everyone is looking. Why kubectl logs gives you the wrong container by default, and why the fault is usually outside the pod.
How do I debug an init container that keeps failing?
The main containers never start until every init container succeeds, so the pod looks stuck while the real failure is somewhere nobody is reading. Logs need the container name, because the default is a container that has not run. Init containers usually wait on something else, so the failure is often outside the pod.
The pod cannot start and the logs look empty
Every init container must exit successfully, in order, before any app container starts. While one is failing the pod sits there and the obvious command returns nothing useful, because it defaults to a container that has not run yet.
kubectl get pod <pod> -n <namespace> \
-o jsonpath='{.status.initContainerStatuses[*].name}'
kubectl logs <pod> -n <namespace> -c <init-container> --previousTwo flags do the work here: the container name, and previous for the run that actually failed.
The fault is usually not in the pod
Init containers mostly wait for things: a database to accept connections, a migration to finish, a secret to appear, a dependency to pass a health check. When one of those is down, the init container is reporting a problem rather than having one. Fixing the pod is the wrong instinct.
They run again on every restart
Each start runs every init container again. One that is not safe to repeat, a migration that assumes it runs once, will behave differently the second time, and a crash loop means it is now running many times.
Reading the status
kubectl get pod <pod> -n <namespace>
# Init:0/2 none have finished
# Init:1/2 the first finished, the second is running or failing
# Init:CrashLoopBackOff one is failing repeatedlyThe fraction tells you which one to look at without describing anything.
What KubeGraf does with this one
KubeGraf reads the failing init container by name, takes its previous logs, and checks the dependency it was waiting on, so the investigation starts where the failure is rather than at the app container.
The reference
The full reference: Init:CrashLoopBackOff.
Sources
Read on 25 November 2026. Check the source before you rely on a detail.
Frequently asked questions
How do I read logs from an init container?
Pass the container name to kubectl logs with the container flag. Without it you get the app container, which has not started.
What does Init:CrashLoopBackOff mean?
An init container is exiting with an error and being restarted with back-off. The pod cannot progress until it exits successfully.
Why do init containers so often wait forever?
Many exist to wait for a database, a migration or a secret. When that dependency is the thing that is down, the init container is a symptom rather than the fault.
Do init containers run again on restart?
Yes. Every init container runs to success in order each time the pod starts, so one that is not safe to repeat will cause trouble.
Want this worked for you on your own clusters? Apply for KubeGraf Freemium. Three calendar months by approval, no card and no automatic paid conversion.
Last updated . Try KubeGraf Freemium.