How to and what components manually should be troubleshooted in Kubernetes using shell script

11/15/2019

I am trying write a bash script to troubleshoot a kubernetes cluster

I have a kubernetes cluster with one master node and few minions.

I am trying to write a script to troubleshoot the cluster which finally outputs a detailed report with errors(if existed) and successes

Q.) What I really need to know is, what steps should I follow and what components should I be testing/checking during the troubleshoot. I need a list of procedures, steps (maybe in bullet form) on how to troubleshoot a Kubernetes Cluster manually

PS: I don't want to use kubernetes in-built testing mechanism, I need it to be manually tested/troubleshooted.

Any one here can give me a good descriptive mechanism/steps?

-- BhagyaKolitha Jayalath
kubectl
kubernetes
minikube

1 Answer

11/15/2019

You need to check below services on master to confirm that kubernetes is functioning fine

  1. docker should be running

  2. kubelet should be running ( if you run control-plane components in containers )

  3. etcd

  4. kubernetes scheduler

  5. kubernetes controller manager

  6. kubernetes components health ( kubectl get cs )

  7. all services in kube-system should be running ( kubectl get pods -n kube-system )

-- P Ekambaram
Source: StackOverflow