In Kubernetes, a
cluster is a group of machines working together.
By running the
kubectl cluster-info command, we can find out high level information about the Kubernetes cluster, such as:
- What address the cluster is running from
- Where the CoreDNS is running from
Example use of KubeCtl Cluser Info
kubectl cluster-info will return the following:
Code language: Bash (bash)
$ kubectl cluster-info Kubernetes master is running at https://998a8a4d-354e-4203-bafb-2e25d7b39269.k8s.example.com CoreDNS is running at https://998a8a4d-354e-4203-bafb-2e25d7b39269.k8s.example.com/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
How to get more information about the cluster
You can also append the keyword
dump to the above command to get a full output about the cluster.
kubectl cluster-info dump
This output can also be piped to a file for later reference, or to view in your favourite code editor/IDE.
kubectl cluster-info dump > file.out