Skip to main content
In this lesson, we troubleshoot a control plane failure caused by a malfunctioning application deployment. We will methodically investigate the issue and apply the necessary corrections to restore cluster functionality.

Setting Up Helpful Shortcuts and Autocompletion

Before diving into troubleshooting, ensure that you have configured an alias for kubectl and enabled autocompletion to speed up command entry. Execute the following commands:
Now you can use commands like kubectl get ... or simply k ... with autocompletion to improve your workflow.

Investigating the Application Deployment

The first step is to verify the cluster node statuses:
Next, examine the deployment. Although the app is deployed, the pod remains unready:
Review the deployment details:
The ReplicaSet confirms that the pod is not ready:
Gather more details by describing the problematic pod:
Since the pod remains in the Pending state without an assigned node, the issue likely originates with the scheduler.

Troubleshooting the Kube Scheduler

Check the kube-scheduler pod within the kube-system namespace:
The image shows a terminal interface with a task to troubleshoot and fix a broken cluster deployment issue.
List the pods in the kube-system namespace to assess the scheduler’s status:
Describe the scheduler pod to identify the error:
The error indicates an incorrect command—“kube-schedulerrrr”—which contains extra characters. Because the kube-scheduler is a static pod defined in /etc/kubernetes/manifests/kube-scheduler.yaml, edit that file to remove the extra characters. After saving the corrected file, check the pod’s status again:
Then verify:
Watch until the pod reaches the ready state:
Finally, review the logs to confirm the scheduler has started successfully:

Scaling the Application Deployment

The next step is to scale the deployment named “app” to two pods. An image below illustrates the expected output:
The image shows a terminal interface with a task to scale a deployment named "app" to 2 pods, alongside a command prompt.
Begin by checking the current deployment status:
Scale the deployment to two replicas:
Verify the updated status:
Then, check the pods:
Since the ReplicaSet is not scaling as expected, the issue may reside with the control plane component, specifically the kube-controller-manager.

Troubleshooting the Kube Controller Manager

List the pods in the kube-system namespace to examine the controller manager’s status:
Describe the controller manager pod to capture error details. Check its logs:
The log message indicates that the controller manager is referencing a non-existent kubeconfig file (/etc/kubernetes/controller-manager-XXXX.conf) instead of the correct /etc/kubernetes/controller-manager.conf. Edit the manifest file located at /etc/kubernetes/manifests/kube-controller-manager.yaml to remove the erroneous characters. A corrected snippet should appear as follows:
Also, ensure that certificate files and other volume mounts are defined correctly. For example, the manifest should include:
After saving the corrected manifest, monitor the controller manager pod:
Once the controller manager pod is running and ready, the scaling issue should resolve since the controller manager updates the ReplicaSets. Confirm this with:
All pods should now be running as expected.
This concludes the troubleshooting lesson for control plane failures. We covered environment setup, diagnosing scheduling issues, and correcting static pod manifest errors for both the kube-scheduler and kube-controller-manager. For more information, refer to the Kubernetes Documentation. Happy troubleshooting!

Watch Video