Navigate:
kube-state-metrics
~$KSM0.1%

Kubernetes Cluster Metrics Exposure Service

Generates Prometheus metrics from Kubernetes API objects for cluster observability.

LIVE RANKINGS • 10:20 AM • STEADY
OVERALL
#405
94
CLOUD & DEVOPS
#29
10
30 DAY RANKING TREND
ovr#405
·Cloud#29
STARS
6.1K
FORKS
2.2K
7D STARS
+4
7D FORKS
+1
See Repo:
Share:

Learn more about kube-state-metrics

kube-state-metrics is a service that listens to the Kubernetes API server and generates metrics about the state of Kubernetes objects. It exposes cluster-level metrics in Prometheus format, covering deployments, nodes, pods, replica sets, services, persistent volumes, and more. Unlike metrics-server which focuses on resource utilization, kube-state-metrics provides metadata and state information such as pod phases, deployment status, and resource quotas. The service is stateless, with metrics generated on-demand from API queries. It's designed for horizontal scalability through sharding and integrates seamlessly with Prometheus monitoring stacks, making it essential for comprehensive Kubernetes observability.

kube-state-metrics

1

Complete Kubernetes Object Coverage

Exposes metrics for over 20 Kubernetes resource types including pods, nodes, deployments, StatefulSets, CronJobs, and custom resources. Provides visibility into object metadata, labels, annotations, and state transitions that aren't available from standard resource metrics, enabling deep cluster analysis and troubleshooting capabilities.

2

Zero State Storage Required

Operates as a stateless service that generates all metrics on-demand by querying the Kubernetes API server. This architecture eliminates persistence requirements, simplifies deployment, and ensures metrics always reflect current cluster state. The design allows for easy scaling and recovery without data loss concerns.

3

Production-Grade Scalability Features

Supports horizontal sharding to distribute metric generation across multiple instances for large clusters. Includes resource filtering, namespace selection, and customizable metric exposure to optimize performance. Features auto-sharding capabilities and leader election support, ensuring reliable operation even in environments with thousands of resources.


# Install using kubectl
kubectl apply -f https://github.com/kubernetes/kube-state-metrics/releases/latest/download/kube-state-metrics.yaml

# Or install via Helm
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
helm install kube-state-metrics prometheus-community/kube-state-metrics \
  --namespace monitoring \
  --create-namespace

vv2.18.0

This release builds with Go v1.25.6 and addresses a regression causing panics with CustomResourceDefinitions while replacing endpoints with endpointslices as default.

  • Built with Go v1.25.6 and k8s.io/client-go v0.34.3
  • Fixed regression that caused a panic when new versions were added to existing CustomResourceDefinitions
  • Endpointslices are now part of the default resources exposed as metrics
  • Endpoints is deprecated and needs to be manually activated through the --resources flag
vv2.17.0

This release adds new pod scheduling metrics, deployment condition reasons, deletion timestamp tracking, and fixes configuration override issues.

  • Built with Go v1.24.6 and k8s.io/client-go v0.33.4
  • Added new metric for pod unscheduled time tracking
  • Fixed index out of range error
  • Fixed config file overrides not applying to some fields
vv2.16.0

This release adds new labels and features including reclaim policy support, regex lookarounds, and object limits while fixing pod status reporting.

  • Added reclaimpolicy label to the kubepersistentvolume_info metric
  • Added dlclark/regexp2 support for lookarounds over standard library regex
  • Fixed correct values reporting in kubepodstatus_reason metric
  • Added pathType to kubeingresspath
  • Introduced object limits


[ EXPLORE MORE ]

Related Repositories

Discover similar tools and frameworks used by developers