Kubernetes SD: Add endpoints role to API servers job to actually discover some API servers

This commit is contained in:
Jimmi Dyson 2016-11-10 09:46:36 +00:00
parent e193579df8
commit 473dd5b89a
No known key found for this signature in database
GPG Key ID: 978CD4AF4C1E87F5
1 changed files with 9 additions and 0 deletions

View File

@ -6,9 +6,18 @@
# `labelmap` relabeling action.
# 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:
- job_name: 'kubernetes-apiservers'
kubernetes_sd_configs:
- role: endpoints
# Default to scraping over https. If required, just disable this or change to
# `http`.
scheme: https