Practice Test - View Certificate Details - Q12 - it has been asked to check the logs of etcd container since the kubectl is not responding. we cannot see logs of any pod since kubectl not working also, there is nothing in the etcd container logs. So what should be the strategy to spot the problem in the setup ? Any tips are welcome @Ashok Kumar @Tej_Singh_Rana @Mohamed Ayman @Basavraj Nilkanthe
If this is on my plate below are my check points
- Check kubectl CLI works or not
- If works, this means api-server and etcd containers are running without any crash but some configs are misplaced
- Then I would try to run
kubectl logs etcd-controlplane -n kube-systemand inspect line by line to verify any error related to certificate or arguments for the container is wrong
- If kubectl doesn’t work then etcd/api-server is not working in other words container crashes, now its time to check docker container level by doing
docker ps -f 'status=exited'this gives more insights about port problem, certificates. NOTE: Need to check the recent exited docker container logs so fast because a little delay in viewing the logs by running the commands we are gonna see no logs, this is because docker clears the logs and according to docker the container is useless since it restarted new container
- If all the above steps doesn’t shed any light then it’s time to check the manifest for api-server, controller-manager, scheduler and etcd for any typos under volumes, volumeMounts, imageName, args, and certificate location are rightly mapped and expiry of the certificate
Hope this makes sense!
Dear @Ashok Kumar thank you for the detailed explanation … really appreciate that … I will keep this in mind while troubleshooting issue
There may be typo mistakes near path section check all paths
Hey @PR thanks for your input … could you please elaborate … which path you are referring to ?
cert file in etcd.yaml file check the path is mentioned correctly
but dont change anything if your not sure
If you the path if it is wrong the correct it