promtool query instant http://prometheus:9090 'topk(20, count by (__name__)({job="kube-state-metrics"}))'Clean up kube-state-metrics noise before device metrics trigger Prometheus cardinality spikes
A practical guide to controlling labels, metrics, and dashboards as Kubernetes exposes more hardware, GPU, and workload context.
Find which kube-state-metrics families inflate Prometheus, prune volatile labels with allowlists, and validate alerts and dashboards before rolling the change out.
Created: June 26, 2026
Published: June 26, 2026
Linux
Measure cardinality, apply kube-state-metrics allowlists, and validate the canary from a Linux shell.
kubectlhelmcurljqoptional promtool
kubectl -n monitoring get deploy kube-state-metrics -o jsonpath='{.spec.template.spec.containers[0].args}'promtool check rules rules/ksm-noise.ymlContent 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.