Which kube-state-metrics metrics do you use most?
BeginnerConceptKubernetes Monitoring, Scale & Cloud
Answer
kube-state-metrics turns the state of Kubernetes objects (from the API server) into metrics:
| Metric | Use |
|---|---|
kube_pod_status_phase |
Pods Pending/Failed |
kube_pod_container_status_restarts_total |
Crash loops |
kube_pod_container_status_waiting_reason |
CrashLoopBackOff, ImagePullBackOff |
kube_deployment_status_replicas_available vs kube_deployment_spec_replicas |
Degraded Deployments |
kube_node_status_condition |
Node Ready / pressure conditions |
kube_pod_container_resource_requests / _limits |
Capacity and cost |
kube_job_status_failed |
Failed Jobs |
kube_persistentvolumeclaim_status_phase |
Unbound PVCs |
It reports desired vs actual state, not resource usage. Usage comes from cAdvisor and node-exporter.
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?IntermediateWhat endpoints does the kubelet expose for Prometheus?Advanced