Metrics Server collects CPU and memory usage from Kubernetes nodes and containers, making resource metrics available for operational inspection and autoscaling. section 5.1.5 section 8.2.2
Use Metrics Server to verify live utilization and support these administrator tasks:
- Run kubectl top pod to inspect pod CPU and memory consumption. section 5.1.5
- Run kubectl top no to inspect node utilization, including CPU and memory percentages. section 8.2.2
- Provide metrics that let a HorizontalPodAutoscaler replace an <unknown> target with an observed value. section 5.1.5
Install and verify Metrics Server
Apply the v0.8.0 components manifest, then patch the deployment with --kubelet-insecure-tls when required by a local kind cluster. After waiting up to 60 seconds, run kubectl top pod or kubectl top no. A working setup produces live readings such as 0m CPU for nginx pods or 265m CPU and 972Mi memory for a node. section 5.1.5 section 8.2.2
root@kind-control-plane:/# kubectl top pod | egrep "CPU|nginx" NAME CPU(cores) MEMORY(bytes) nginx-5c799c6d5f-4lkr9 0m 3Mi nginx-5c799c6d5f-8w494 0m 2Mi
Inspect representative kubectl top pod output showing CPU and memory readings after Metrics Server becomes available. section 5.1.5
