0
0
Kubernetesdevops~30 mins

Metrics Server installation in Kubernetes - Mini Project: Build & Apply

Choose your learning style9 modes available
Metrics Server Installation in Kubernetes
📖 Scenario: You are managing a Kubernetes cluster and want to monitor resource usage like CPU and memory. To do this, you need to install the Metrics Server, which collects these metrics from all nodes and pods.
🎯 Goal: Install the Metrics Server in your Kubernetes cluster and verify it is running correctly to enable resource monitoring.
📋 What You'll Learn
Create a namespace for the Metrics Server
Apply the Metrics Server deployment manifest
Verify the Metrics Server pods are running
Check that metrics can be retrieved from the cluster
💡 Why This Matters
🌍 Real World
Metrics Server is essential for monitoring resource usage in Kubernetes clusters, helping maintain healthy workloads and efficient resource allocation.
💼 Career
DevOps engineers and cluster administrators use Metrics Server to enable autoscaling and monitor cluster health in production environments.
Progress0 / 4 steps
1
Create the kube-system namespace
Create a Kubernetes namespace called kube-system using the command kubectl create namespace kube-system.
Kubernetes
Need a hint?

Namespaces help organize your cluster resources. Use kubectl create namespace kube-system to create it.

2
Download the Metrics Server manifest
Download the official Metrics Server deployment manifest from https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml and save it as components.yaml.
Kubernetes
Need a hint?

Use curl -LO or wget to download the manifest file.

3
Deploy the Metrics Server to the cluster
Apply the components.yaml manifest to the kube-system namespace using kubectl apply -f components.yaml -n kube-system.
Kubernetes
Need a hint?

Use kubectl apply with the -n kube-system option to deploy in the correct namespace.

4
Verify Metrics Server is running and check metrics
Run kubectl get pods -n kube-system to check the Metrics Server pod status, then run kubectl top nodes to see resource metrics.
Kubernetes
Need a hint?

Use kubectl get pods -n kube-system to see if the pod is running, then kubectl top nodes to view metrics.