How to check health of kubernetes cluster

10/21/2019

I know that i can use kubectl get componentstatus command to check the health status of the k8 cluster but some how the output i am receiving do not show the health. Below is the output from master server.

enter image description here

I can do deployments, can create pods and services which means everything is working fine but not sure how to check the health status.

-- thinkingmonster
kubectl
kubernetes

2 Answers

10/21/2019

try this command

kubectl cluster-info
-- P Ekambaram
Source: StackOverflow

10/21/2019

can you try with this command

 kubectl get componentstatus -o jsonpath="{.items[*].conditions[*].status}"

I know both commands are same but outputting it as yaml worked for me

-- prashant
Source: StackOverflow