Page cover

Troubleshooting

Application Failure

This section is straight forward, to debug applications refer to the kubernetes docs page.

Lab:

The most things I mistaked in:

  • Not paying attention to the svc names

The troubleshooting went in these processes:

  • kubectl get pods

  • kubectl describe pods

  • kubectl get svc

  • kubectl describe svc

  • kubectl get deployments

Control Plane Failure

First check status of nodes if they are healthy:

Then status of pods:

You can also check the control plane services manually if they are deployed as services:

Check Service logs:

Lab:

The issue I encountered is so important, when I checked the logs of kube-controller-manager, there was a file not found error, but I made sure the client certificate path was right.

circle-exclamation

Worker Node Failure

Same steps as before, describe the worker nodes to lead us to the solution.

When a worker node stops communicating to a master it is shown as unknown:

Then we can proceed to check status of the nodes:

Also checking kubelet status on the worker nodes:

Check Certificates:

Lab:

Everything went well, but make sure to view the certificate details from the below docs

Also, when editing the /etc/kubernetes/kubelet.conf make sure to restart the kubelet using:

Network Troubleshooting

CoreDNS Troubleshooting Commands

Check if a network plugin is installed:

Upgrade Docker (specific commands can vary based on your system):

Disable SELinux:

Modify CoreDNS to allow privilege escalation:

Adjust kubelet config to use an alternate resolv.conf

Edit the kubelet config file (usually at /var/lib/kubelet/config.yaml) and add:

Then restart the kubelet service.

Edit Corefile to forward DNS queries directly to an upstream DNS:

Check kube-dns service endpoints:

Kube-Proxy Troubleshooting Commands

Check kube-proxy pod status:

Check kube-proxy logs:

Verify kube-proxy configmap:

Check for kube-proxy network bindings:

Debug Service issues:

DNS Troubleshooting:

Lab:

First, I must check if CNI is installed, and I falied to do so, its as easy as just running a $ kubectl apply -f https://github.com/weaveworks/weave/releases/download/v2.8.1/weave-daemonset-k8s.yaml

Also, second challenge I were so close, I knew the error was from kube-proxy config not found error, the same mistake I did was not checking the volumeMounts when editing the pod, its not necessary that the path on the pod must be in the current live machine of where you're solving the challenges.

Slides

Last updated