I have one confusion in the control Plane troubleshooting in CKA: cc @unnivkn, @ . . .

R Banerjee:
I have one confusion in the control Plane troubleshooting in CKA:
cc @unnivkn, @Tej_Singh_Rana ( some help , if feasible )
Question 4: The changes by the lab-tools were made to the PKI Directory and kubectl logs -n kube-system kube-controller-manager-control-plane was not working because of the wrong directory structure.
Issue: If we could see the logs, we can identify the issue, but when I started, I checked the kubectl describe -n kube-system kube-controller-manager-control-plane and saw the below code:

  Warning  Failed   9m19s                   kubelet  Error: Error response from daemon: Conflict. The container name "/k8s_kube-controller-manager_kube-controller-manager-controlplane_kube-system_8dff69aaaed9905f30b82acb3caa7a3b_0" is already in use by container "46535f619309b34a85269f4442f7e6d6efe7098f5f7b694ec7a5c76da8f1838e". You have to remove (or rename) that container to be able to reuse that name.

This made me think that I needed to change the name of the container using docker rename. Since I did find an issue , I started debugging it in that way, so I am not sure if the error log above is a misdirection , or a side-effect of the PKI issue, or a new issue itself.

R Banerjee:
https://kodekloud.com/topic/practice-test-control-plane-failure-2/?utm_source=udemy&utm_medium=labs&utm_campaign=kubernetes Q4

R Banerjee:
I started checking the solution video and it seems that the solution mentioned there did not hit this problem,… If this is an environmental issue, this may not be solvable in the exam, right?

unnivkn:
controlplane $ kubectl -n kube-system logs kube-controller-manager-controlplane
Flag --port has been deprecated, see --secure-port instead.
I0218 08:15:05.793690 1 serving.go:331] Generated self-signed cert in-memory
unable to load client CA file “/etc/kubernetes/pki/ca.crt”: open /etc/kubernetes/pki/ca.crt: no such file or directory
controlplane $

R Banerjee:
@unnivkn: agreed, but if I see this log in the describe pod , what should I do?

  Warning  Failed   9m19s                   kubelet  Error: Error response from daemon: Conflict. The container name "/k8s_kube-controller-manager_kube-controller-manager-controlplane_kube-system_8dff69aaaed9905f30b82acb3caa7a3b_0" is already in use by container "46535f619309b34a85269f4442f7e6d6efe7098f5f7b694ec7a5c76da8f1838e". You have to remove (or rename) that container to be able to reuse that name.

unnivkn:
while troubleshooting, we have to analyze all the available error messages & come up to a solution. I understand the above error message is misleading.

R Banerjee:
Issue is, this can take a lot of time out from the current tests ( which happened in the troubleshooting ). Hope it doesn’t happen in the main tests :slightly_smiling_face: