Course contentsShow
← Cloud and Infrastructure
Lesson 1446 of 2,98929. Kubernetes ObservabilityFree lesson

Installing and Configuring Metrics Server

Deploying Metrics Server in a cluster, configuring TLS settings, and verifying metrics collection functionality.

Installing and Configuring Metrics Server

What You'll Learn

You'll learn how to deploy Metrics Server in your Kubernetes cluster, configure its TLS settings, and verify it's collecting metrics properly.

Understanding Metrics Server Deployment

Metrics Server is your cluster's metrics collection engine, but it needs to be installed separately—it doesn't come pre-configured in most Kubernetes distributions. Think of it like installing a speedometer in a car that tracks performance data but doesn't have the gauge built-in yet.

Deploying Metrics Server

The standard installation uses a YAML manifest from the official repository:

kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml

This creates a Deployment in the kube-system namespace along with necessary RBAC resources and a Service.

Configuring TLS Settings

Metrics Server uses secure communication with the kubelet, but in development or test clusters with self-signed certificates, you may need to relax TLS validation:

spec:
  template:
    spec:
      containers:
      - name: metrics-server
        args:
        - --kubelet-insecure-tls  # Skip certificate validation
        - --kubelet-preferred-address-types=InternalIP

Note: Never use --kubelet-insecure-tls in production environments—proper certificates should be configured instead.

Verifying Metrics Collection

After deployment, confirm Metrics Server is functioning:

kubectl get deployment metrics-server -n kube-system
kubectl top nodes
kubectl top pods -A

If kubectl top commands return resource usage, your Metrics Server is successfully collecting metrics from kubelets across your cluster.

Key Takeaway: Installing Metrics Server involves deploying its components via YAML manifests, optionally adjusting TLS settings for your environment, and verifying metrics collection with kubectl top commands to ensure your cluster's observability foundation is operational.