Display Cluster Info

KubernetesKubernetesBeginner
Practice Now

Introduction

Kubernetes is a container orchestration platform that automates the deployment, scaling, and management of containerized applications. In this lab, we will explore the cluster-info command, which provides information about the Kubernetes cluster.


Skills Graph

%%%%{init: {'theme':'neutral'}}%%%% flowchart RL kubernetes(("`Kubernetes`")) -.-> kubernetes/ClusterInformationGroup(["`Cluster Information`"]) kubernetes/ClusterInformationGroup -.-> kubernetes/cluster_info("`Cluster Info`") subgraph Lab Skills kubernetes/cluster_info -.-> lab-8426{{"`Display Cluster Info`"}} end

Get The Kubernetes Cluster Information

To get the Kubernetes cluster information, use the following command:

kubectl cluster-info

This command displays the Kubernetes cluster's API server endpoint and the Kubernetes version.
lab-display-cluster-info-1

Get The Kubernetes Components Information

To get the Kubernetes components' information, use the following command:

kubectl cluster-info dump

This command displays detailed information about the Kubernetes components, including etcd, kube-apiserver, kube-controller-manager, kube-scheduler, and other Kubernetes system components.
lab-display-cluster-info-2

Summary

In this lab, we explored the cluster-info command, which provides information about the Kubernetes cluster. We learned how to get the Kubernetes cluster information, components information, services information, nodes information, pods information, events information, endpoints information, storage classes information, and persistent volumes information. By using these commands, you can get a better understanding of the Kubernetes cluster's state and diagnose issues in the cluster.

Other Kubernetes Tutorials you may like