Kubernetes object metrics collection for the goldentooth cluster.
This repository contains the Kubernetes manifests for deploying kube-state-metrics, which exposes metrics about Kubernetes objects (pods, deployments, services, etc.) to Prometheus.
- Namespace:
kube-state-metrics
- Service Account: With cluster-wide read permissions for Kubernetes objects
- ClusterRole: Comprehensive permissions to list and watch all relevant Kubernetes resources
- Deployment: Single replica deployment of kube-state-metrics v2.13.0
- Service: ClusterIP service exposing metrics on port 8080
kube-state-metrics provides metrics for:
- Pods, Deployments, ReplicaSets, StatefulSets, DaemonSets
- Services, Endpoints, Ingresses
- ConfigMaps, Secrets, PersistentVolumes, PersistentVolumeClaims
- Nodes, Namespaces, Jobs, CronJobs
- HorizontalPodAutoscalers, PodDisruptionBudgets
- NetworkPolicies, StorageClasses, VolumeAttachments
- And many more Kubernetes objects
This repository is automatically deployed via Argo CD using the gitops-repo
ApplicationSet. The deployment:
- Creates the
kube-state-metrics
namespace - Deploys kube-state-metrics with proper RBAC permissions
- Exposes metrics for Prometheus scraping
- Uses security best practices (non-root user, read-only filesystem, dropped capabilities)
The service includes Prometheus annotations for automatic discovery:
annotations:
prometheus.io/scrape: 'true'
prometheus.io/port: '8080'
prometheus.io/path: '/metrics'
This enables Prometheus to automatically scrape Kubernetes object metrics from the cluster.