From 7de03a12799005a0a7fd1e54d7370459bc81c32d Mon Sep 17 00:00:00 2001 From: Dalton Hubble Date: Tue, 6 Nov 2018 23:02:45 -0800 Subject: [PATCH] Fix Prometheus etcd scrape config for DigitalOcean * 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__) --- addons/prometheus/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/prometheus/config.yaml b/addons/prometheus/config.yaml index e910e804..b1d38307 100644 --- a/addons/prometheus/config.yaml +++ b/addons/prometheus/config.yaml @@ -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'