Skip to content

Commit

Permalink
Fix Prometheus etcd scrape config for DigitalOcean
Browse files Browse the repository at this point in the history
* Kubelet uses a node's hostname as the node name, which isn't
resolvable on DigitalOcean. On DigitalOcean, the node name was
set to the internal IP until #337 switched to instead configuring
kube-apiserver to prefer the InternalIP for communication
* Explicitly configure etcd scrapes to target each controller by
internal IP and port 2381 (replace __address__)
  • Loading branch information
dghubble committed Nov 7, 2018
1 parent be9f7b8 commit 7de03a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/prometheus/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ data:
regex: 'true'
- action: labelmap
regex: __meta_kubernetes_node_label_(.+)
- source_labels: [__meta_kubernetes_node_name]
- source_labels: [__meta_kubernetes_node_address_InternalIP]
action: replace
target_label: __address__
replacement: '${1}:2381'
Expand Down

0 comments on commit 7de03a1

Please sign in to comment.