Back to guidesGuide

Control Kubernetes custom metric cardinality before HPA and remote_write lie to you

A practical workflow for exposing useful business metrics without turning Prometheus, autoscaling, and dashboards into a noise factory.

Learn how to design, audit, and roll out Kubernetes custom metric exporters with label budgets, PromQL tests, remote_write guardrails, and HPA validation.

Created: July 25, 2026

Published: July 25, 2026

Estimated time45 min
LevelAdvanced
Before you startRead access to Prometheus and the /api/v1/status/tsdb endpoint.
PlatformsLinux / Docker
WhatsAppXLinkedIn

Linux

Audit cardinality, validate rules, and prove HPA consumes fresh metrics before promoting the exporter.

kubectlcurljqpromtool
List custom metrics resources
kubectl get --raw /apis/custom.metrics.k8s.io/v1beta2 | jq '.resources[].name'
Inspect Prometheus series state
curl -s http://prometheus.monitoring:9090/api/v1/status/tsdb | jq '.data.headStats'
Validate rules before rollout
promtool check rules custom-metrics.rules.yaml && promtool test rules custom-metrics.test.yaml

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.