How to Check Kubernetes Cluster Health Status
In this blog, you will learn different ways to check Kubernetes cluster health status.
To check the Kubernetes cluster health, you can do the following.
- Check cluster API health
- Check Node status
- Check cluster pod status
Kubernetes Cluster Health Check Command
You can check the health of the API endpoints using the following command.
kubectl get --raw='/readyz?verbose'
From within the cluster, you can use
curl -k https://localhost:6443/livez?verbose
There is also a component status command that is deprecated but works in the latest version.
kubectl get cs
Kubernetes Node Status Command
The following kubectl command gives you the status of the node.
kubectl get nodes
To get a detailed status and information of Kubernetes nodes, use the following kubectl command.
kubectl describe nodes
Check Cluster Pod Status
List all the cluster pods from the
kube-system namespace and check their status.
kubectl get po -n kube-system
When it comes to day-to-day kubernetes operations, it is essential to check the cluster status using different ways to ensure the cluster is running without any issues.
If you are preparing for Kubernetes certification, check out the CKA exam guide and use the CKA coupon to get discounts on certification registration.
If you are learning Kubernetes, check out the best Kubernetes tutorials.