Get K8 cluster information

Anju
Nov 28, 2024

--

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

--

--

Anju
Anju

Written by Anju

A DevOps engineer who loves automating everything (almost), exploring new places, and finding peace in nature. Always looking for the next adventure!

No responses yet