Overview
The metrics server is a key component in Kubernetes used for collecting and aggregating metrics such as CPU and memory usage from nodes and pods. These metrics are essentials for monitoring, scalling, and ensuring the health of Kubernetes clusters.
- The metrics server collects resource usage metrics (e.g, CPU and memory) from the Kubelets running on each node.
- It aggregates these metrics and makes them available via the Kubernetes API, enabling components like the Horizontal Pod Autoscalling (HPA) to make informed decissions.
Getting Started
Pre-requisites
- Install
helm
https://helm.sh/docs/intro/install/
Installation
Install metrics-server in namespaces metrics-server
.
Validate and check apiservices
Wait until metrics-server/metrics-server changes to True
Usage
In real cases metrics server help you to enable HPA or VPA (Vertical Pod Autoscalling) to make informed decissions.