Kubernetes Cluster Metrics Exposure Service
Generates Prometheus-compatible metrics from Kubernetes API objects, providing comprehensive observability for cluster resources and workload health monitoring.
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-namespaceNext 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.
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.
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.
Top in Cloud & DevOps
Related Repositories
Discover similar tools and frameworks used by developers
build-push-action
GitHub Action for building and publishing Docker images.
awx
Django-based control plane for centralized Ansible management.
checkout
Clones repositories to workflows with configurable authentication and fetch depth.
node_exporter
Collects Unix system metrics for Prometheus monitoring.
aws-cdk
Programming language abstractions that synthesize into CloudFormation templates.