Merge pull request #1123 from keegancsmith/k8s-example
Move InCluster auth in kubernetes example config
This commit is contained in:
commit
a88ed8c2ff
|
@ -1,22 +1,17 @@
|
||||||
# A scrape configuration containing exactly one endpoint to scrape:
|
# A scrape configuration for running prometheus in cluster on kubernetes. It
|
||||||
# Here it's Prometheus itself.
|
# will create endpoints for node and master roles, as well as any service
|
||||||
global:
|
# which is annotated with `prometheus_io_scrape=true`
|
||||||
scrape_interval: 15s # By default, scrape targets every 15 seconds.
|
|
||||||
evaluation_interval: 15s # By default, scrape targets every 15 seconds.
|
|
||||||
scrape_timeout: 10s
|
|
||||||
|
|
||||||
scrape_configs:
|
scrape_configs:
|
||||||
- job_name: 'kubernetes'
|
- job_name: 'kubernetes'
|
||||||
|
|
||||||
tls_config:
|
|
||||||
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
|
|
||||||
|
|
||||||
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
|
|
||||||
|
|
||||||
kubernetes_sd_configs:
|
kubernetes_sd_configs:
|
||||||
- masters:
|
- masters:
|
||||||
- 'https://kubernetes.default.svc'
|
- 'https://kubernetes.default.svc'
|
||||||
in_cluster: true
|
in_cluster: true
|
||||||
|
tls_config:
|
||||||
|
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
|
||||||
|
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
|
||||||
|
|
||||||
relabel_configs:
|
relabel_configs:
|
||||||
- source_labels: [__meta_kubernetes_role, __meta_kubernetes_service_annotation_prometheus_io_scrape]
|
- source_labels: [__meta_kubernetes_role, __meta_kubernetes_service_annotation_prometheus_io_scrape]
|
||||||
|
|
Loading…
Reference in New Issue