A user creates a Deployment with 'replicas: 3'. After applying the manifest, only 2 pods are running. What is the most likely cause?
Trap 1: The Deployment's YAML had a syntax error
A YAML syntax error would cause kubectl apply to reject the manifest outright, so no Deployment would exist and no pods would run. It is tempting because malformed manifests do block creation, but the stem states the Deployment was applied and two pods are running, proving parsing succeeded.
Trap 2: The container image name is misspelled
A misspelled image name produces ImagePullBackOff on affected pods, leaving them in Pending or waiting states rather than running. It is tempting because bad image references are a common cause of missing pods, but here two pods are actually running, indicating scheduling or resource constraints instead.
Trap 3: The ReplicaSet controller is not running
The ReplicaSet controller runs inside the kube-controller-manager, which also manages Deployments; if it were down, no ReplicaSet would exist and zero pods would run, not two. It is tempting because controller failures do stall reconciliation, but that scenario presents as total absence of pods.
- A
The Deployment's YAML had a syntax error
Why it fails: A YAML syntax error would cause kubectl apply to reject the manifest outright, so no Deployment would exist and no pods would run. It is tempting because malformed manifests do block creation, but the stem states the Deployment was applied and two pods are running, proving parsing succeeded.
- B
There is insufficient node capacity to schedule the third pod
The ReplicaSet controller has created three pods, but the scheduler leaves one Pending because no node has sufficient allocatable CPU or memory. Replica count and scheduling are separate concerns, so insufficient node capacity is the most likely cause.
- C
The container image name is misspelled
Why it fails: A misspelled image name produces ImagePullBackOff on affected pods, leaving them in Pending or waiting states rather than running. It is tempting because bad image references are a common cause of missing pods, but here two pods are actually running, indicating scheduling or resource constraints instead.
- D
The ReplicaSet controller is not running
Why it fails: The ReplicaSet controller runs inside the kube-controller-manager, which also manages Deployments; if it were down, no ReplicaSet would exist and zero pods would run, not two. It is tempting because controller failures do stall reconciliation, but that scenario presents as total absence of pods.