Skip to content

Sources

Kubernetes native metrics

  • Metrics For Kubernetes System Components

https://kubernetes.io/docs/concepts/cluster-administration/system-metrics/

  • Kubernetes Metrics Reference

https://kubernetes.io/docs/reference/instrumentation/metrics/

  • Kubernetes Component SLI Metrics

https://kubernetes.io/docs/reference/instrumentation/slis/

Kubelet

Kubelet listens https requests by default in the 10250 port, including the metrics. The http insecure port is disabled by default and it can be enabled with the readOnlyPort setting

The cadvisor port is 4194

Prometheus operator creates a service called kubelet with the following argument

--kubelet-service=kube-system/kubelet

These are the metrics exposed

  • /metrics
  • /metrics/cadvisor
  • /metrics/resource
  • /metrics/probes
  • /metrics/slis

Cadvisor (kubelet) https://github.com/google/cadvisor

cAdvisor – a Docker daemon metrics – containers monitoring

Provides resource usage and performance characteristics of running containers. It is integrated into the Kubelet in Kubernetes and is responsible for collecting, aggregating, processing, and exporting information about running containers.

Note that kubelet also exposes metrics in /metrics/cadvisor, /metrics/resource and /metrics/probes endpoints. Those metrics do not have the same lifecycle.

https://github.com/google/cadvisor

Kube state metrics

https://github.com/kubernetes/kube-state-metrics kube-state-metrics – deployments, pods, nodes

Provides metrics about the state of Kubernetes objects (e.g., deployments, nodes, pods), but not resource usage metrics.

Some considerations:

Kubestate metrics

Metrics server

https://github.com/kubernetes-sigs/metrics-server

Provides resource usage metrics (e.g., CPU, memory) for Kubernetes objects

Prometheus adapter

https://github.com/kubernetes-sigs/prometheus-adapter

Allows custom metrics to be exposed to the Kubernetes API, but it relies on Prometheus to collect the metrics.

Node exporter

node-exporter: EC2 instances metrics – CPU, memory, network