CKS - Challenges: Lab - Challenge 3

Hi,

I was working on CKS Challenge 3.

However, after modifying the following kube-scheduler manifest file by adding --profiling=false to the command section, the kube-scheduler wouldn’t start up.

/etc/kubernetes/manifests/kube-scheduler.yaml

I checked the running pods with kubectl get pods -A command, but it looks like the kube-scheduler pod is simply missing. I am not sure how to troubleshoot this because I don’t see any logs under /var/log/pods directly either.

Did I do something wrong? Has anyone encountered this issue before? Is it because I need to perform the task in certain order?

You will have got a syntax error in the manifest YAML if it cannot start. Check kubelet logs on control plane, and also logs of kube-scheduler.
You can use this technique. It is the same for all control plane static pods.

1 Like

If there are no logs in /var/log/pods, then it is almost certainly a YAML syntax error and kubelet cannot parse it. This will be reported in kubelet logs.

1 Like

Thank you @Alistair_KodeKloud for the quick response. This is super helpful. I am able to spot an issue with my YAML file easily. Need to review and master this documentation in detail.

Knowing how to debug control plane pods not restarting is invaluable in the exam! If you knock out a cluster and can’t recover it, all questions on that cluster will score zero.
Also watch the video linked at the end of the doc.

1 Like

In fact, try the exercises in the linked github repo first, then watch the video for the solutions.

1 Like