Communication between k8s dashboard and metrics server

108 Views Asked by At

How do k8s dashbaord and metrics server communicate? Just like in Prometheus scrapes metrics exposed via REST. How to check what exactly metrics server exposes?

1

There are 1 best solutions below

0
On

Metrics server is using k8s metrics API to export mertics to k8s.

Also check: k8s monitoring architecture. This document proposes a high-level monitoring architecture for Kubernetes.


How to check what exactly metrics server exposes

Use api endpoint:

kubectl get --raw "/apis/metrics.k8s.io/v1beta1/pods" | jq
kubectl get --raw "/apis/metrics.k8s.io/v1beta1/nodes" | jq

If you don't have any custom metrics exposed you will see that the only exposed metrics are CPU and Memory (for every pod/node).