Skip to main content
In this lesson we troubleshoot a broken Kubernetes cluster where an application Deployment never becomes ready. We’ll inspect control plane components (kube-scheduler and kube-controller-manager), correct errors in static Pod manifests, and verify the application can scale normally after fixes.
Tip: Create a short alias for kubectl and enable shell autocompletion to speed up commands while troubleshooting.
Quick setup for the shell:
Recommended references:

1) Symptom: Application Pod is Pending (unscheduled)

Start by checking node and Deployment status:
Example kubectl get deploy output (relevant lines):
Describe the Deployment to view replica conditions and events:
Key excerpt you might see:
Inspect the ReplicaSet and Pod that the Deployment created:
If the Pod is Pending with Node: <none>, it means the Pod has not been scheduled — scheduling is kube-scheduler’s responsibility. Check the kube-system namespace for scheduler health:
Example problematic scheduler Pod:
Describe the scheduler Pod to find the crash reason:
A common error in the container status:
This indicates the kube-scheduler static Pod manifest contains a typo in the command (executable name). Static Pod manifests live on the host at:
Open that file and inspect the container command. Example incorrect manifest snippet:
Correct the typo (use kube-scheduler), save the file, and kubelet will automatically recreate the Pod from the updated manifest:
Verify the scheduler restarts cleanly:
Once kube-scheduler is Running and Ready, it will assign unscheduled Pods to nodes and the application Pod should transition out of Pending.
Warning: When editing static Pod manifests on control plane hosts, ensure syntax is valid YAML and paths match the node filesystem. kubelet will manage restarts automatically; a malformed file can prevent the component from coming back up.

2) Symptom: Scaling the Deployment does not add replicas

Attempting to scale the Deployment:
But the Deployment still shows fewer Pods than desired:
Scaling and ReplicaSet reconciliation are performed by the kube-controller-manager. Check its Pod status:
If the controller manager Pod is in CrashLoopBackOff, inspect it:
A frequent error is a missing kubeconfig file:
Open the static Pod manifest for the controller manager on the host:
Check the --kubeconfig argument in the command args. Example incorrect line:
If the actual kubeconfig file is /etc/kubernetes/controller-manager.conf, update the manifest to point to the correct file:
Save the manifest; kubelet will restart the controller manager Pod. Watch its status:
When the kube-controller-manager reaches Running and Ready, it will process scaling operations and create new Pods for the Deployment.

3) Symptom: Controller manager still failing to reconcile (missing certs volume)

If the controller manager is still unable to reconcile objects despite fixing the kubeconfig, check its logs again:
You might see an error like:
Verify the PKI file exists on the host:
If the host file exists but the controller manager Pod cannot access it, inspect the volumeMounts and volumes in /etc/kubernetes/manifests/kube-controller-manager.yaml. Example problematic configuration:
If you see an incorrect host path such as /etc/kubernetes/WRONG-PKI-DIRECTORY for the k8s-certs volume, correct it to the actual PKI directory on the host (/etc/kubernetes/pki):
Save the manifest and let kubelet restart the controller manager. Confirm it reaches Running and Ready:
Once the controller manager can read required certificates and kubeconfig, it will resume reconciling Deployments and ReplicaSets.

4) Verify the application now scales correctly

After fixing:
  • kube-scheduler command typos,
  • kube-controller-manager --kubeconfig path,
  • any incorrect hostPath mounts for certificates,
verify the Deployment scales as expected:
Expected result: the Deployment reaches the desired replica count (for example, 3/3 READY) and all Pods are in Running state.

Troubleshooting checklist (summary)


Final notes
  • Always inspect kubectl describe and kubectl logs for component-level errors.
  • When editing static Pod manifests, prefer small, well-validated edits and monitor kubectl get pods -n kube-system until control plane components are healthy.
  • If multiple control plane hosts exist, ensure files and mounts are consistent across all control plane nodes.
Relevant links:

Watch Video