kube-state-metrics is the standard Kubernetes state-metrics exporter for Prometheus. Install it via Helm and expose 200+ object metrics with zero configuration drift and sub-second polling.
From single-node dev clusters to 10,000-node enterprise fleets, KSM delivers accurate, consistent Kubernetes state data to your entire observability stack.
Every Kubernetes object exposed as Prometheus metrics. Pods, Deployments, StatefulSets, DaemonSets, Nodes, PersistentVolumes, Ingress, Jobs, CronJobs — with zero extra configuration.
Browse all metrics →State changes reflected in under 100ms via Kubernetes informers. No polling lag, no stale data — your alerts fire when the issue actually occurs.
Principle of least privilege built in. Fine-grained RBAC, shard-level access control, and TLS encryption on all endpoints out of the box.
Scale to 10,000+ nodes by distributing object-type processing across multiple KSM replicas. Linear scalability with zero configuration complexity.
Expose metrics from your own CRDs with a single configuration block. No code changes, no recompilation — just YAML.
Native OpenMetrics v2 support and OpenTelemetry exporter compatibility. Works with every modern observability backend.
Label all metrics with cluster identifiers for seamless multi-cluster federation. One dashboard to rule them all.
Reduce cardinality and scrape overhead by filtering precisely which metrics and labels are exposed. Slash storage costs by up to 60%.
Sample metrics from a production cluster. KSM makes this data instantly queryable with Prometheus.
KSM listens to Kubernetes API events via informers, transforms object state into Prometheus-compatible metrics, and serves them on a high-performance HTTP endpoint.
Three installation methods — pick what fits your workflow. All produce the same powerful KSM deployment.
See how KubeStateMetrics stacks up against alternatives for Kubernetes observability.
| Feature | KubeStateMetrics | cAdvisor | Metrics Server | Custom Scripts |
|---|---|---|---|---|
| Object State Metrics | ✓ Full Coverage | ✗ | ✗ | ~ Manual |
| Resource Usage Metrics | ~ Via cAdvisor | ✓ Native | ~ Basic | ~ Manual |
| Prometheus Integration | ✓ Native | ✓ | ✗ | ~ Custom |
| Horizontal Sharding | ✓ Built-in | ✗ | ✗ | ✗ |
| Custom Resource Support | ✓ CRD Config | ✗ | ✗ | ~ Manual |
| Label Allow/Deny Lists | ✓ Full Control | ✗ | ✗ | ~ Manual |
| RBAC Security | ✓ Fine-grained | ~ Basic | ✓ | ~ Custom |
| Maintenance Overhead | ✓ Zero config | ✓ Low | ✓ Low | ✗ High |
| Alert Rules Library | ✓ 50+ built-in | ~ Basic | ✗ | ✗ |
| Grafana Dashboard | ✓ Included | ✓ | ✗ | ✗ |
Read the full kube-state-metrics vs Metrics Server comparison →
Teams commonly build Grafana dashboards on top of kube_deployment_status_replicas_available and kube_pod_status_phase to track availability SLOs across every namespace from a single pane of glass.
Because kube-state-metrics already covers Deployments, StatefulSets, Jobs, HPAs, and PVCs out of the box, most teams retire custom scripts that polled the Kubernetes API directly for the same data.
The CustomResourceStateMetrics config lets operators expose CRD status fields as first-class Prometheus metrics without writing a dedicated exporter for every custom controller.
Deploy KubeStateMetrics in 60 seconds and transform your Kubernetes observability forever.