From 6a4ce96b7df8a6cf72fc943def5924c6d517b34c Mon Sep 17 00:00:00 2001 From: Evan Zeimet Date: Fri, 13 Jul 2018 09:15:28 -0500 Subject: [PATCH] Variablize kube_proxy_healthz_bind_address This fixes #3014 --- roles/kubernetes/node/defaults/main.yml | 3 +++ .../kubernetes/node/templates/manifests/kube-proxy.manifest.j2 | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/roles/kubernetes/node/defaults/main.yml b/roles/kubernetes/node/defaults/main.yml index 9a3a08e5b..ae2274f30 100644 --- a/roles/kubernetes/node/defaults/main.yml +++ b/roles/kubernetes/node/defaults/main.yml @@ -14,6 +14,9 @@ kubelet_bind_address: "{{ ip | default('0.0.0.0') }}" # resolv.conf to base dns config kube_resolv_conf: "/etc/resolv.conf" +# bind address for kube-proxy health check +kube_proxy_healthz_bind_address: "127.0.0.1" + # Can be ipvs, iptables kube_proxy_mode: iptables diff --git a/roles/kubernetes/node/templates/manifests/kube-proxy.manifest.j2 b/roles/kubernetes/node/templates/manifests/kube-proxy.manifest.j2 index 2209709b6..7096a2ff2 100644 --- a/roles/kubernetes/node/templates/manifests/kube-proxy.manifest.j2 +++ b/roles/kubernetes/node/templates/manifests/kube-proxy.manifest.j2 @@ -42,7 +42,7 @@ spec: - --cluster-cidr={{ kube_pods_subnet }} - --proxy-mode={{ kube_proxy_mode }} - --oom-score-adj=-998 - - --healthz-bind-address=127.0.0.1 + - --healthz-bind-address={{ kube_proxy_healthz_bind_address }} {% if kube_proxy_masquerade_all and kube_proxy_mode == "iptables" %} - --masquerade-all {% elif kube_proxy_mode == 'ipvs' %}