What endpoints does the kubelet expose for Prometheus?
AdvancedConceptKubernetes Monitoring, Scale & Cloud
Answer
All on the kubelet's secure port 10250, protected by authn/authz (Prometheus needs a ServiceAccount with nodes/metrics access):
| Path | Content |
|---|---|
/metrics |
Kubelet's own metrics: pod start latency, PLEG relist duration, volume operations |
/metrics/cadvisor |
Container CPU, memory, network, filesystem (container_*) |
/metrics/probes |
Liveness/readiness/startup probe results (prober_probe_total) |
/metrics/resource |
Compact CPU/memory data used by metrics-server |
kubectl get --raw /api/v1/nodes/<node>/proxy/metrics/cadvisor | head
A useful health signal is kubelet_pleg_relist_duration_seconds: when PLEG relisting gets slow (container runtime struggling), nodes flip to NotReady with "PLEG is not healthy".
More on Kubernetes Monitoring, Scale & Cloud
What is kube-prometheus-stack and what does it install?BeginnerWhat CRDs does the Prometheus Operator provide?IntermediateHow does the Prometheus Operator decide which ServiceMonitors to load?IntermediateWhich cAdvisor container memory metric should you watch, and why?IntermediateHow do metrics-server and the custom/external metrics APIs relate to HPA?IntermediateWhich kube-state-metrics metrics do you use most?Beginner