The deployment pink-depl-cka14-trb was expected to run 2 replicas.
However:
kubectl get deploy pink-depl-cka14-trb NAME READY UP-TO-DATE AVAILABLE pink-depl-cka14-trb 0/2 1 0
The deployment wanted 2 replicas, but only 1 replica was being managed.
Deployment YAML:
spec: replicas: 2
ReplicaSet:
kubectl describe rs pink-depl-cka14-trb-df6c5bb49 Replicas: 1 current / 1 desired Annotations: deployment.kubernetes.io/desired-replicas: 1 deployment.kubernetes.io/max-replicas: 2
Red Flag:
Checking deployment status revealed:
metadata: generation: 3 status: observedGeneration: 1
Generation was 3, but observedGeneration was still 1.
This means the Deployment Controller had not processed the latest changes.
The deployment object was being updated, but the controller responsible for reconciling Deployments wasn't working correctly.
kubectl get pods -n kube-system | grep controller
Output:
kube-controller-manager-cluster4-controlplane 0/1 CrashLoopBackOff
This immediately pointed to the control plane rather than the deployment itself.
Inspecting the static pod manifest:
sudo cat /etc/kubernetes/manifests/kube-controller-manager.yaml
Found a typo:
command: - kube-controller-manage
Correct value:
command: - kube-controller-manager
A single missing "r" caused the kube-controller-manager to crash continuously.
Without the controller manager running:
sudo vi /etc/kubernetes/manifests/kube-controller-manager.yaml
Replace:
kube-controller-manage
With:
kube-controller-manager
Save the file and wait for the kubelet to recreate the static pod.
Verify:
kubectl get pods -n kube-system | grep controller
Expected:
kube-controller-manager-cluster4-controlplane 1/1 Running
kubectl get deploy pink-depl-cka14-trb
Expected:
NAME READY UP-TO-DATE AVAILABLE pink-depl-cka14-trb 2/2 2 2
The deployment controller observes the latest generation, scales the ReplicaSet, and creates the missing pod.
If you ever see:
spec.replicas: 2 status.replicas: 1 generation: 3 observedGeneration: 1
Think beyond the deployment itself and inspect the control plane.
A mismatch between generation and observedGeneration is a strong indicator that the controller responsible for processing that resource is unhealthy.