How to find out Cluster Info in Kubernetes

0 min read 136 words

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:

  1. What address the cluster is running from
  2. Where the CoreDNS is running from

Example use of KubeCtl Cluser Info

kubectl cluster-info will return the following:

$ 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

Andrew
Andrew

Andrew is a visionary software engineer and DevOps expert with a proven track record of delivering cutting-edge solutions that drive innovation at Ataiva.com. As a leader on numerous high-profile projects, Andrew brings his exceptional technical expertise and collaborative leadership skills to the table, fostering a culture of agility and excellence within the team. With a passion for architecting scalable systems, automating workflows, and empowering teams, Andrew is a sought-after authority in the field of software development and DevOps.

Tags