-
Notifications
You must be signed in to change notification settings - Fork 176
Closed
Description
Hi 👋
I’ve just tested the metrics exposure for Kamaji. Since we’re not using prometheus-operator (yet), I had to adapt the configuration to use classic Prometheus scrape configs — that part is all good.
However, while doing so I noticed an issue:
Kamaji creates a Service of type ClusterIP and configures scraping from it. This results in Prometheus only scraping metrics from one control plane instance, rather than all of them.
This is a problem because:
- While the Kubernetes API is stateless, the metrics are not aggregated between control planes.
- Scraping through a ClusterIP service results in Prometheus hitting just one of the backing Pods.
Suggested improvements:
- Use a headless Service instead.
- For classic Prometheus setups, leverage the
dns_sd_configsfeature to discover all Pod endpoints behind the headless Service. - For
prometheus-operator, this might be solvable withendpointsorpodMonitor, but I currently can’t test this.
Maybe related: prometheus-operator/prometheus-operator#1899
bsctljoseluisgonzalezca
Metadata
Metadata
Assignees
Labels
No labels