# kube-state-metrics

> Add-on agent to generate and expose cluster-level metrics about the state of Kubernetes objects

Source: https://talira.ai/catalog/kube-state-metrics-0ma7kerz
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Infrastructure
- Categories: [devops / observability / metrics / exporters](https://talira.ai/categories/devops/observability/metrics/exporters)
- Platforms: kubernetes[^1]
- Licence: Apache-2.0[^2]
- Pricing: Free and open source[^2]
- Free tier: yes[^2]
- Self-hostable: yes[^1]
- Backed by: [Kubernetes](https://talira.ai/orgs/kubernetes.md)

kube-state-metrics (KSM) listens to the [Kubernetes](https://talira.ai/catalog/kubernetes-ftsegx3m.md) API server and generates metrics about the state of objects such as deployments, nodes and pods, served in Prometheus text format on /metrics for [Prometheus](https://talira.ai/catalog/prometheus-198e2rss.md) or any compatible scraper. It exposes the API's raw data unmodified, so its numbers can differ from [kubectl](https://talira.ai/catalog/kubectl-s0j8r2b4.md)'s, and it holds a snapshot of cluster state in memory rather than storing history. Large clusters can be split across instances by sharding. It is a Kubernetes project sponsored by SIG Instrumentation, Apache-2.0, and its official [Helm](https://talira.ai/catalog/helm-wvsxp6a4.md) chart is maintained in the prometheus-community charts repository.

## Links

- Website: https://kubernetes.io/docs/concepts/cluster-administration/kube-state-metrics/
- GitHub: https://github.com/kubernetes/kube-state-metrics
- Docs: https://github.com/kubernetes/kube-state-metrics/tree/main/docs

## Ways to install

### On Kubernetes

- [Artifact Hub](https://talira.ai/catalog/artifact-hub-s43pzyps.md): <https://artifacthub.io/packages/helm/prometheus-community/kube-state-metrics>[^1]

## Problems it solves

- alert when a deployment has fewer ready replicas than it should
- count pods stuck in Pending or CrashLoopBackOff across the whole cluster in Prometheus
- graph how many pods restart per namespace over time
- know when a Kubernetes CronJob or Job failed from my monitoring system
- expose node conditions like DiskPressure or NotReady as metrics
- track resource requests and limits per container to plan cluster capacity
- turn Kubernetes object labels into Prometheus labels so I can group metrics by team
- alert when a PersistentVolumeClaim stays unbound
- generate metrics from the status fields of my own custom resources
- monitor the state of thousands of objects in a big cluster without one huge exporter process

## Features

- metrics for the state of Kubernetes objects such as deployments, nodes, pods and jobs
- Prometheus text format on /metrics (port 8080 by default)
- raw values from the Kubernetes API, unmodified
- custom resource state metrics from your own CRDs (feature-frozen)
- Kubernetes labels exposed as Prometheus labels, with conflict resolution
- allow and deny lists for metrics
- horizontal sharding, automated in a StatefulSet, and DaemonSet sharding for pod metrics
- namespace and resource filtering for limited-privilege deployments
- healthz, livez and readyz endpoints
- multi-architecture images: amd64, arm, arm64, ppc64le and s390x

## Limitations

- Doesn't store or forward metrics: it serves the cluster's current object state on /metrics for Prometheus or another scraper to collect[^1]

## Trust

Overall: 0.27 out of 1.
Signals: backing 0.30, extensibility 0.00.

- backed by Kubernetes

Warnings:

- GitHub activity not fetched yet

## Related

- Works with [Prometheus](https://talira.ai/catalog/prometheus-198e2rss.md)
- Works with [kube-prometheus-stack](https://talira.ai/catalog/kube-prometheus-stack-weeqng9w.md)

## Sources

[^1]: https://github.com/kubernetes/kube-state-metrics/blob/main/README.md (checked 19 Nov 2026)
[^2]: https://github.com/kubernetes/kube-state-metrics/blob/main/LICENSE (checked 19 Nov 2026)
