Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

What is metrics-server and How to Install metrics-server in kubernetes?

Metrics Server is a scalable, efficient source of container resource metrics for Kubernetes built-in autoscaling pipelines.

Metrics Server collects resource metrics from Kubelets and exposes them in Kubernetes apiserver through Metrics API for use by Horizontal Pod Autoscaler and Vertical Pod Autoscaler. Metrics API can also be accessed by kubectl top, making it easier to debug autoscaling pipelines.

Metrics Server is not meant for non-autoscaling purposes. For example, don’t use it to forward metrics to monitoring solutions, or as a source of monitoring solution metrics.

Metrics Server offers:

  • A single deployment that works on most clusters
  • Scalable support up to 5,000 node clusters
  • Resource efficiency: Metrics Server uses 0.5m core of CPU and 4 MB of memory per node\

The way it works is relatively simple:

  • CAdvisor collects metrics about containers and nodes that on which it is installed. Note: CAdvisor is installed by default on all cluster nodes
  • Kubelet exposes these metrics (default is one-minute resolution) through Kubelet APIs.
  • Metrics Server discovers all available nodes and calls Kubelet API to get containers and nodes resources usage.
  • Metrics Server exposes these metrics through Kubernetes aggregation API.

How to install it?

Refernece

https://github.com/kubernetes-incubator/metrics-serverhttps://blog.kloia.com/kubernetes-hpa-externalmetrics-prometheus-acb1d8a4ed50https://levelup.gitconnected.com/kubernetes-monitoring-101-core-pipeline-services-pipeline-a34cd4cc9627

Rajesh Kumar
Follow me