What's the difference?
Pending vs ContainerCreating
Two pods that are not running yet. Watch how far each one travels before it stops.
Side by side
One never gets a node. One is getting ready.
Pod A reaches the scheduler and stops there: none of the three nodes fits, so it is Pending and nothing anywhere is trying to run it. The scheduler keeps retrying. Pod B is bound to node B straight away. Its kubelet must have the volume attached before it can start the container, so the pod shows ContainerCreating until that finishes.
- new pod
- no node fits
- retry
- waiting on volume
- ready
Side by side
One never gets a node. One is getting ready.
Pod A reaches the scheduler and stops there: none of the three nodes fits, so it is Pending and nothing anywhere is trying to run it. The scheduler keeps retrying. Pod B is bound to node B straight away. Its kubelet must have the volume attached before it can start the container, so the pod shows ContainerCreating until that finishes.
- new pod
- no node fits
- retry
- waiting on volume
- ready
- PendingThe scheduler lights up red. The pod never appears on any node.
- ContainerCreatingThe pod is on a node in amber. Something on that node, here the volume, is still being prepared.
How to tell them apart
| Question | Pending | ContainerCreating |
|---|---|---|
| Has a node? | No. NODE shows <none> | Yes. NODE shows where it landed |
| Who is working on it | The scheduler | The kubelet on that node |
| Typical reasons | Not enough CPU or memory to request, taints, node selectors, unbound volume claims | Volume attach or mount, CNI network setup, missing Secret or ConfigMap, image pull |
| The event to read | FailedScheduling from default-scheduler | FailedMount, FailedAttachVolume or FailedCreatePodSandBox from kubelet |
| First command | kubectl describe pod, then kubectl describe nodes | kubectl describe pod, then the node's kubelet and CNI |
| Fixed by | Making a node fit: free capacity, lower requests, add a toleration or a node | Fixing what the node is waiting for: the volume, the network or the config |
Has a node?
- Pending
- No. NODE shows <none>
- ContainerCreating
- Yes. NODE shows where it landed
Who is working on it
- Pending
- The scheduler
- ContainerCreating
- The kubelet on that node
Typical reasons
- Pending
- Not enough CPU or memory to request, taints, node selectors, unbound volume claims
- ContainerCreating
- Volume attach or mount, CNI network setup, missing Secret or ConfigMap, image pull
The event to read
- Pending
- FailedScheduling from default-scheduler
- ContainerCreating
- FailedMount, FailedAttachVolume or FailedCreatePodSandBox from kubelet
First command
- Pending
- kubectl describe pod, then kubectl describe nodes
- ContainerCreating
- kubectl describe pod, then the node's kubelet and CNI
Fixed by
- Pending
- Making a node fit: free capacity, lower requests, add a toleration or a node
- ContainerCreating
- Fixing what the node is waiting for: the volume, the network or the config
In short
Pending vs ContainerCreating: the difference
Pending: no node has been chosen, so nothing is even trying to start it. ContainerCreating: a node has it, and the kubelet is still getting things ready.
The two statuses describe different stages, and different components are responsible. A pod shown as Pending has not been assigned to a node. The scheduler looked at every node and none passed its filters: not enough unreserved CPU or memory for the pod's requests, a taint the pod does not tolerate, a node selector or affinity rule nothing matches, or a volume claim that cannot be bound. Nothing is running anywhere, and the scheduler's events say why. A pod shown as ContainerCreating has been scheduled. Its node's kubelet is preparing what the containers need before starting them: attaching and mounting volumes, setting up the pod's network through the CNI plugin, fetching Secrets and ConfigMaps, pulling images. If it stays there, one of those steps is slow or failing, and the kubelet's events on the pod name which one.
Your turn
Which one is this?
Which one is this? kubectl get pods -o wide shows a pod at 0/1 for five minutes with a node name in the NODE column. Its events repeat “FailedMount … timed out waiting for the condition”.
Related errors
Questions
- What is the difference between Pending and ContainerCreating?
- Pending in kubectl means no node has been assigned: the scheduler cannot place the pod. ContainerCreating means the pod is on a node and the kubelet is still setting up volumes, networking, configuration or images before starting the containers.
- Why is my pod stuck in ContainerCreating?
- Something the containers need is not ready on the node. Read the pod's events: they usually name a volume that will not attach or mount, a network sandbox that cannot be created, or a missing Secret or ConfigMap.
- Is ContainerCreating a pod phase?
- No. The pod's phase is still Pending at that point. ContainerCreating is the waiting reason of its containers, which kubectl shows in the STATUS column once the pod has a node.
Sources: Kubernetes docs: Pod lifecycle, pod phase ↗ · Kubernetes docs: Kubernetes scheduler ↗ · Kubernetes docs: Debug pods ↗ · Report a problem
Diagrams are our own simulations. All wording is original and paraphrases the linked Kubernetes documentation.
Practise: diagnose the cluster
Read the terminal, watch the animation, pick the error and the first fix.