Navigate:
All Reposkube-state-metrics
~$KUBEST0.0%

Kubernetes Cluster Metrics Exposure Service

Generates Prometheus-compatible metrics from Kubernetes API objects, providing comprehensive observability for cluster resources and workload health monitoring.

LIVE RANKINGS • 06:51 AM • STEADY
OVERALL
#239
56
CLOUD & DEVOPS
#16
6
30 DAY RANKING TREND
ovr#239
·Cloud#16
STARS
6.0K
FORKS
2.1K
DOWNLOADS
7D STARS
+2
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.17.0

Next release will disable endpoint metrics by default in favor of endpointslices; override via config if needed.

  • Add deletion timestamp metrics for DaemonSet, StatefulSet, Deployment, Service, PDB, and HorizontalPodAutoscaler resources.
  • Track pod unscheduled time and include reason label in kube_deployment_status_condition for improved observability.
vv2.16.0

Builds with Go 1.24.4 and k8s.io/client-go v0.32.6; adds object limits, endpoint authn/z, and fixes pod status reason reporting.

  • Configure object limits to cap resource usage per resource type using the new object limits feature.
  • Enable endpoint authentication and authorization with `WithAuthenticationAndAuthorization` for secure metric access.
vv2.15.0

Builds with Go 1.23.5 and k8s.io/client-go v0.32.1; fixes custom resource cache bugs and adds timezone-aware CronJob metrics.

  • Upgrade to Go 1.23.5 and k8s.io/client-go v0.32.1 before deploying to match new build dependencies.
  • CronJob metrics now include timezone labels and timezone-aware next_schedule_time; review dashboards relying on kube_cronjob_info.


[ EXPLORE MORE ]

Related Repositories

Discover similar tools and frameworks used by developers