Lightning Lab 1 - Question 3 : A kubeconfig file called admin.kubeconfig has bee . . .

Gurudutt Dongre:
Lightning Lab 1 - Question 3 : A kubeconfig file called admin.kubeconfig has been created in /root/CKA. There is something wrong with the configuration. Troubleshoot and fix it.
Couldnt figure out the solution. How to go about troubleshooting this ? Thanks in advance.

Tej_Singh_Rana:
Hello, @Gurudutt Dongre
Use that kubeconfig file with the kubectl command, like below:-

kubectl config view --kubeconfig=/root/CKA/admin.kubeconfig
--
kubectl get pods --kubeconfig=/root/CKA/admin.kubeconfig

and identify the error.

Gurudutt Dongre:
ah…got it!! Thank you. I know my mistake now.

I Malla:
In that question , after running that command we get issue of certificate . But actual issue is of port .

Why is the provided log and issue different?

Tej_Singh_Rana:
That’s strange, I will check @I Malla

Tej_Singh_Rana:
Thanks for reporting.

Could you please let know how to find port details used by controlplane/master ?

If you go to the Kubenetes doc site and search “Kube api port”, you should see a doc called “Controlling Acess to Kubernetes” and it states that the Kubernetes API runs on pport 6443.

You can also find the “Ports and Protocols” document page and it also states that K8s API is 6443.

I am not good at memorizing these specific details like port numbers but knowing how to search the Kubernetes docs has definitely helped me with my CKA exam prep.