Interactive guide to the resource metrics pipeline behind kubectl top and Horizontal Pod Autoscaling.
Metrics Server is the lightweight short-term resource metrics path for Kubernetes autoscaling and quick inspection. It is not a full observability stack.
Core Model
Understand the Concept First
Cluster-wide aggregator
Metrics Server gathers CPU and memory usage across nodes in the cluster.
Metrics API provider
It exposes those metrics through the Kubernetes Metrics API.
Autoscaling foundation
HPA and kubectl top depend on this pipeline.
Lifecycle Flow
Metrics Collection Path
1
Kubelets expose metrics
Each node provides resource usage data for the Pods running there.
2
Metrics Server scrapes
The service collects resource usage from kubelets.
3
API aggregation layer serves results
Metrics become available through the Kubernetes API server.
4
kubectl top and HPA consume data
Humans and controllers query the same aggregated metrics path.
5
Observation and scaling happen
Operators inspect usage and autoscalers act on thresholds.
Metrics Server provides current operational resource data, not long historical monitoring data.
Visual Diagrams
Metrics Pipeline Architecture
Complete Metrics Flow (15s Scraping Interval)
The Metrics Server scrapes kubelet APIs every 15 seconds by default. This provides near-real-time resource metrics without persistent storage overhead.