docker run --rm --network host curlimages/curl:8.7.1 -sG 'http://127.0.0.1:9090/api/v1/query' --data-urlencode 'query=sum(scrape_samples_post_metric_relabeling{job="kube-state-metrics"})'Clean up kube-state-metrics noise so your dashboards mean something again
How to cut useless series, adapt to EndpointSlices, and separate state from usage without blinding the team.
kube-state-metrics is still valuable, but in 2026 it exposes more surface area, more stable metrics, and recent defaults such as EndpointSlices. If your dashboards filled up with irrelevant series, fragile joins, or duplicated states, this guide shows how to reduce noise at the source, fix your queries, and validate that the cleanup does not break alerts or troubleshooting.
Created: April 20, 2026
Published: April 20, 2026
Docker
Useful for validating queries and scrape reductions from a workstation or lab where Prometheus and kube-state-metrics endpoints are already exposed.
docker run --rm --network host curlimages/curl:8.7.1 -s 'http://127.0.0.1:8080/metrics?resources=pods,deployments,statefulsets' | head -40docker run --rm --network host curlimages/curl:8.7.1 -sG 'http://127.0.0.1:9090/api/v1/query' --data-urlencode 'query=topk(20,count by (__name__) ({job="kube-state-metrics"}))'Content locked
This guide requires both steps before full content is available.
- ○Click “Like” on this guide.
- ○Share on WhatsApp, X, LinkedIn, or copy the link.
Access is automatically unlocked as soon as both steps are completed.