Skip to content

Commit

Permalink
Kubernetes SD: Update example config to use endpoints role for API se…
Browse files Browse the repository at this point in the history
…rver discovery
  • Loading branch information
jimmidyson committed Nov 2, 2016
1 parent 4d37dca commit da23543
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions documentation/examples/prometheus-kubernetes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,13 @@ scrape_configs:
# insecure_skip_verify: true
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token

static_configs:
- targets:
- kubernetes.default.svc
# Keep only the default/kubernetes service endpoints for the https port. This
# will add targets for each API server which Kubernetes adds an endpoint to
# the default/kubernetes service.
relabel_configs:
- source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name]
action: keep
regex: default;kubernetes;https

- job_name: 'kubernetes-nodes'

Expand Down

0 comments on commit da23543

Please sign in to comment.