Kubernetes Cluster Metrics Exposure Service
Generates Prometheus metrics from Kubernetes API objects for cluster observability.
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.
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.
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.
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-namespaceThis 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
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
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
Top in Cloud & DevOps
Related Repositories
Discover similar tools and frameworks used by developers
Kubespray
Production-grade Kubernetes deployment via Ansible playbooks.
Kaniko
Daemon-free Docker image builder for Kubernetes clusters.
GitHub Agentic Workflows
Write AI workflows in natural language markdown that execute as GitHub Actions with built-in safety controls.
AWS CDK
Programming language abstractions that synthesize into CloudFormation templates.
AWX
Django-based control plane for centralized Ansible management.