Kubernetes Pod Debugging Cheat Sheet/Inspect init container statuses

See waiting, terminated, and exit details for init containers.

Section: Init Container Debugging

Inspect init container statuses

bash
bash
kubectl get pod <pod> -n <namespace> -o jsonpath='{.status.initContainerStatuses}{"
"}'

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Init Container Debugging
Read logs from an init container
Inspect the failing setup step before app containers start.
OpenIn sheetbashsame section
Describe init container failure
Read events and termination details from the pod description.
OpenIn sheetbashsame section
Copy a pod and override its command
Use kubectl debug to clone a pod with a safer command for inspection.
OpenIn sheetbashsame section
Show termination reason
Check whether the last exit reason was OOMKilled.
OpenIn sheetbash1 tag match
Show last exit code
Inspect the numeric exit code for the container.
OpenIn sheetbash1 tag match
Show waiting reason for first container
Compact way to inspect wait state reasons.
OpenIn sheetbash1 tag match