Pod is stuck in the ContainerCreating state
Production Risk
The application is not running, leading to reduced capacity or a full service outage if all pods are stuck.
The pod has been scheduled to a node, but the container for the pod cannot be created. This is not a transient state but a persistent blockage preventing the pod from running.
- 1A referenced ConfigMap or Secret does not exist, preventing volume mount
- 2The node does not have enough resources to allocate to the container
- 3A persistent volume claim (PVC) cannot be mounted
- 4Container runtime (like Docker or containerd) is not responding
A new pod remains in the ContainerCreating state for several minutes without transitioning to Running.
kubectl get pods
expected output
NAME READY STATUS RESTARTS AGE my-app-deployment-5dcfc6b6-abcde 0/1 ContainerCreating 0 5m
Fix 1
Describe the pod to find the root cause
WHEN The reason for being stuck is unknown
kubectl describe pod my-app-deployment-5dcfc6b6-abcde
Why this works
The Events section in the output of `describe pod` usually contains a specific error message from the kubelet explaining why container creation is failing.
Fix 2
Verify the existence of ConfigMaps and Secrets
WHEN The pod description mentions a missing ConfigMap or Secret
kubectl get configmap my-config && kubectl get secret my-secret
Why this works
Check that all configuration resources referenced by the pod spec exist in the same namespace as the pod.
✕ Restart the kubelet without investigation
While a kubelet issue could be the cause, it is usually a configuration problem with the pod itself. Restarting the kubelet may mask the real issue or cause wider disruption.
k8s.io/api/core/v1 — PodStatus
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev