Inspect the numeric exit code for the container.

Section: Resources and OOMKilled

Show last exit code

bash
bash
kubectl get pod <pod> -n <namespace> -o jsonpath='{.status.containerStatuses[0].lastState.terminated.exitCode}{"
"}'

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 Resources and OOMKilled
Show termination reason
Check whether the last exit reason was OOMKilled.
OpenIn sheetbashsame section
Check resource usage for a pod
Compare live usage against requests and limits.
OpenIn sheetbashsame section
Show pod resource requests and limits
Inspect CPU and memory resource settings quickly.
OpenIn sheetbashsame section
Inspect init container statuses
See waiting, terminated, and exit details for init containers.
OpenIn sheetbash1 tag match
Show waiting reason for first container
Compact way to inspect wait state reasons.
OpenIn sheetbash1 tag match
List Pending pods
Find pods stuck before startup.