# Note that this only handles authentication for service discovery. If the
# target itself requires authentication to be scraped, that must be
# configured separately via `tls_config`, `bearer_token`, etc. at the
# `scrape_config` level.
[ in_cluster: <boolean> ]
# Optional authentication information used to authenticate to the API server.
# Optional authentication information used to authenticate to the API server.
# Note that `basic_auth`, `bearer_token` and `bearer_token_file` options are
# Note that `basic_auth`, `bearer_token` and `bearer_token_file` options are
# mutually exclusive.
# mutually exclusive.
...
@@ -618,12 +616,9 @@ basic_auth:
...
@@ -618,12 +616,9 @@ basic_auth:
# account and set in_cluster to true.
# account and set in_cluster to true.
tls_config:
tls_config:
[ <tls_config> ]
[ <tls_config> ]
# Retry interval between watches if they disconnect.
[ retry_interval: <duration> | default = 1s ]
```
```
Where `<role>` must be `endpoint`, `service`, `pod`, `container`, `node`, or `apiserver`.
Where `<role>` must be `endpoints`, `service`, `pod`, or `node`.
See [this example Prometheus configuration file](https://github.com/prometheus/prometheus/blob/master/documentation/examples/prometheus-kubernetes.yml)
See [this example Prometheus configuration file](https://github.com/prometheus/prometheus/blob/master/documentation/examples/prometheus-kubernetes.yml)
for a detailed example of configuring Prometheus for Kubernetes.
for a detailed example of configuring Prometheus for Kubernetes.