Sometimes you need a glance at your cluster with a handy command instead of relying on a fancy dashboard or a heavy monitoring setup. Here are some quick and simple commands to get an overview of your Kubernetes cluster:
kubectl version
Client Version: v1.27.2
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390bf3
Server Version: v1.25.9
$ kubectl cluster-info
Kubernetes control plane is running at https://example.com:443
CoreDNS is running at https://example.com:443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
Metrics-server is running at https://example.com:443/api/v1/namespaces/kube-system/services/https:metrics-server:/proxy
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
kubectl get componentstatus
Warning: v1 ComponentStatus is deprecated in v1.19+
NAME STATUS MESSAGE ERROR
controller-manager Healthy ok
scheduler Healthy ok
etcd-0 Healthy ok
kubectl api-resources
kubectl get --raw '/healthz'
ok
kubectl get --raw /version