Commit 329a84af authored by Fabian Reinartz's avatar Fabian Reinartz Committed by Brian Brazil

Update Kubernetes SD config

parent 1d8a2fe3
...@@ -462,19 +462,16 @@ create multiple target groups: ...@@ -462,19 +462,16 @@ create multiple target groups:
The following meta labels are available on targets during relabeling: The following meta labels are available on targets during relabeling:
<<<<<<< HEAD
* All roles: * All roles:
* `__meta_kubernetes_role`: the role of the target: one of `apiserver`, * `__meta_kubernetes_role`: the role of the target: one of `endpoint`, `service`, `pod`, `container`, `node`, or `apiserver`
`endpoint`, `node`, `pod`, `container` or `service`
* Nodes: * Nodes:
* `__meta_kubernetes_node_label_<labelname>`: each node label from the * `__meta_kubernetes_node_label_<labelname>`: each node label from the Kubernetes API
Kubernetes API
* Services and Endpoints: * Services and Endpoints:
* `__meta_kubernetes_service_namespace`: the namespace of the service * `__meta_kubernetes_service_namespace`: the namespace of the service
* `__meta_kubernetes_service_name`: the name of the service * `__meta_kubernetes_service_name`: the name of the service
* `__meta_kubernetes_service_label_<labelname>`: each service label from the * `__meta_kubernetes_service_label_<labelname>`: each service label from the Kubernetes API
Kubernetes API * `__meta_kubernetes_service_annotation_<annotationname>`: each service annotation from the Kubernetes API
* `__meta_kubernetes_service_annotation_<annotationname>`: each service
annotation from the Kubernetes API
* Pods and Containers: * Pods and Containers:
* `__meta_kubernetes_pod_name`: the name of the pod * `__meta_kubernetes_pod_name`: the name of the pod
* `__meta_kubernetes_pod_namespace`: the namespace of the service * `__meta_kubernetes_pod_namespace`: the namespace of the service
...@@ -501,6 +498,9 @@ See below for the configuration options for Kubernetes discovery: ...@@ -501,6 +498,9 @@ See below for the configuration options for Kubernetes discovery:
api_servers: api_servers:
- [<host>] - [<host>]
# The Kubernetes role of entities that should be discovered.
role: <role>
# Run in cluster. This will use the automounted CA certificate and bearer # Run in cluster. This will use the automounted CA certificate and bearer
# token file at /var/run/secrets/kubernetes.io/serviceaccount/ in the pod. # token file at /var/run/secrets/kubernetes.io/serviceaccount/ in the pod.
[ in_cluster: <boolean> ] [ in_cluster: <boolean> ]
...@@ -530,7 +530,8 @@ tls_config: ...@@ -530,7 +530,8 @@ tls_config:
[ retry_interval: <duration> | default = 1s ] [ retry_interval: <duration> | default = 1s ]
``` ```
There are example Kubernetes SD configs on [GitHub](https://github.com/prometheus/prometheus/blob/master/documentation/examples/prometheus-kubernetes.yml).
Where `<role>` must be `endpoint`, `service`, `pod`, `container`, `node`, or `apiserver`.
### `<marathon_sd_config>` ### `<marathon_sd_config>`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment