The official Kubernetes state metrics exporter for Prometheus. Install kube-state-metrics 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 | ✓ | ✗ | ✗ |
"KubeStateMetrics is the backbone of our entire Kubernetes observability stack. We run 200+ clusters and rely on it to alert us before issues affect customers. Nothing else comes close."
"We replaced a 3,000-line custom metrics collection framework with KSM + 20 lines of Helm values. The horizontal sharding feature alone saved us from a complete re-architecture."
"Migrating to KSM's custom resource support let us expose our operator's state as first-class Prometheus metrics. Our on-call load dropped 40% in the first month."
Deploy KubeStateMetrics in 60 seconds and transform your Kubernetes observability forever.