Document

SUBSCRIBE TO GET FULL ACCESS TO THE E-BOOKS FOR FREE 🎁SUBSCRIBE NOW

Professional Dropdown with Icon

SUBSCRIBE NOW TO GET FREE ACCESS TO EBOOKS

Metrics Server

Kubernetes Metrics Server

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

1. Download the metric server

wget https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
kubectl create ns kubernetes-infra
kubectl config set-context --namespace=kubernetes-infra --current

2. Modify the above yaml file with following bold code

 containers:

      – name: metrics-server

        image: k8s.gcr.io/metrics-server/metrics-server:v0.3.7

        imagePullPolicy: IfNotPresent

        args:

          – –cert-dir=/tmp

          – –secure-port=4443

          – –kubelet-preferred-address-types=InternalIP

 

          – –kubelet-insecure-tls

3. kubectl create -f components.yaml
4. kubectl top nodes
5. kubectl top pods
Share your love

Leave a Reply

Your email address will not be published. Required fields are marked *