Verify Kubernetes Cluster Health

KubernetesKubernetesBeginner
Practice Now

Introduction

In this challenge, you will need to perform a comprehensive health check of a Kubernetes cluster as a junior DevOps engineer. This involves starting the Minikube Kubernetes cluster, retrieving and displaying the list of nodes, and verifying the cluster's basic information using kubectl cluster-info. The cluster must have at least one node in the Ready status to pass the verification.


Skills Graph

%%%%{init: {'theme':'neutral'}}%%%% flowchart RL kubernetes(("Kubernetes")) -.-> kubernetes/BasicCommandsGroup(["Basic Commands"]) kubernetes(("Kubernetes")) -.-> kubernetes/ClusterInformationGroup(["Cluster Information"]) kubernetes(("Kubernetes")) -.-> kubernetes/TroubleshootingandDebuggingCommandsGroup(["Troubleshooting and Debugging Commands"]) kubernetes/BasicCommandsGroup -.-> kubernetes/get("Get") kubernetes/ClusterInformationGroup -.-> kubernetes/cluster_info("Cluster Info") kubernetes/TroubleshootingandDebuggingCommandsGroup -.-> kubernetes/describe("Describe") subgraph Lab Skills kubernetes/get -.-> lab-433779{{"Verify Kubernetes Cluster Health"}} kubernetes/cluster_info -.-> lab-433779{{"Verify Kubernetes Cluster Health"}} kubernetes/describe -.-> lab-433779{{"Verify Kubernetes Cluster Health"}} end

Verify Kubernetes Cluster Health

As a junior DevOps engineer, you'll need to perform a comprehensive health check of the Kubernetes cluster to ensure all critical components are operational and ready for deployment.

Tasks

  • Start the Minikube Kubernetes cluster (Free users can skip this task because the cluster is already pre-started)
  • Retrieve and display the list of nodes in the cluster
  • Verify the cluster's basic information using kubectl cluster-info

Requirements

  • Use Minikube to start the Kubernetes cluster
  • Ensure you are working in the ~/project directory
  • Use kubectl commands to inspect the cluster
  • The cluster must have at least one node in Ready status

Examples

Example of expected node output:

NAME       STATUS   ROLES           AGE   VERSION
minikube   Ready    control-plane   5m    v1.20.0

Example of cluster info output:

Kubernetes control plane is running at https://192.168.49.2:8443
CoreDNS is running at https://192.168.49.2:8443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy

Hints

  • Remember to start Minikube before running kubectl commands
  • Use kubectl get nodes to list cluster nodes
  • Use kubectl cluster-info to get cluster details
  • Check the node status to ensure the cluster is healthy
โœจ Check Solution and Practice

Summary

In summary, this challenge requires you to verify the health of a Kubernetes cluster by starting the Minikube cluster, retrieving the list of nodes, and checking the cluster's basic information. The key requirements are to use Minikube to start the cluster, work in the ~/project directory, and ensure the cluster has at least one node in the Ready status.