mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-27 22:49:40 -08:00
Kubernetes SD: Add endpoints role to API servers job to actually discover some API servers (#2181)
This commit is contained in:
commit
17a95f3366
|
@ -6,9 +6,18 @@
|
||||||
# `labelmap` relabeling action.
|
# `labelmap` relabeling action.
|
||||||
|
|
||||||
# Scrape config for API servers.
|
# Scrape config for API servers.
|
||||||
|
#
|
||||||
|
# Kubernetes exposes API servers as endpoints to the default/kubernetes
|
||||||
|
# service so this uses `endpoints` role and uses relabelling to only keep
|
||||||
|
# the endpoints associated with the default/kubernetes service using the
|
||||||
|
# default named port `https`. This works for single API server deployments as
|
||||||
|
# well as HA API server deployments.
|
||||||
scrape_configs:
|
scrape_configs:
|
||||||
- job_name: 'kubernetes-apiservers'
|
- job_name: 'kubernetes-apiservers'
|
||||||
|
|
||||||
|
kubernetes_sd_configs:
|
||||||
|
- role: endpoints
|
||||||
|
|
||||||
# Default to scraping over https. If required, just disable this or change to
|
# Default to scraping over https. If required, just disable this or change to
|
||||||
# `http`.
|
# `http`.
|
||||||
scheme: https
|
scheme: https
|
||||||
|
|
Loading…
Reference in a new issue