From e451751bfe8c9b4c244eec2dcd825b7d94ec6410 Mon Sep 17 00:00:00 2001 From: Daniel Leining Date: Tue, 5 Jul 2016 17:14:12 -0400 Subject: [PATCH 1/2] make kubelet use "ip" as bind address --- roles/kubernetes/node/templates/kubelet.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/kubernetes/node/templates/kubelet.j2 b/roles/kubernetes/node/templates/kubelet.j2 index c7bc6fcf0..85ba6cdea 100644 --- a/roles/kubernetes/node/templates/kubelet.j2 +++ b/roles/kubernetes/node/templates/kubelet.j2 @@ -11,7 +11,7 @@ KUBE_ALLOW_PRIV="--allow_privileged=true" KUBELET_API_SERVER="--api_servers={% for host in groups['kube-master'] %}https://{{ hostvars[host]['access_ip'] | default(hostvars[host]['ip'] | default(hostvars[host]['ansible_default_ipv4']['address'])) }}:{{ kube_apiserver_port }}{% if not loop.last %},{% endif %}{% endfor %}" {% endif %} # The address for the info server to serve on (set to 0.0.0.0 or "" for all interfaces) -KUBELET_ADDRESS="--address=0.0.0.0" +KUBELET_ADDRESS="--address={{ ip | default(0.0.0.0) }}" # The port for the info server to serve on # KUBELET_PORT="--port=10250" # You may leave this blank to use the actual hostname From 1491aed45a14c110c12b38f68bde1d33b292119f Mon Sep 17 00:00:00 2001 From: Daniel Leining Date: Tue, 5 Jul 2016 17:23:08 -0400 Subject: [PATCH 2/2] fix kubelet ip with quotes --- roles/kubernetes/node/templates/kubelet.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/kubernetes/node/templates/kubelet.j2 b/roles/kubernetes/node/templates/kubelet.j2 index 85ba6cdea..d96f7ff6e 100644 --- a/roles/kubernetes/node/templates/kubelet.j2 +++ b/roles/kubernetes/node/templates/kubelet.j2 @@ -11,7 +11,7 @@ KUBE_ALLOW_PRIV="--allow_privileged=true" KUBELET_API_SERVER="--api_servers={% for host in groups['kube-master'] %}https://{{ hostvars[host]['access_ip'] | default(hostvars[host]['ip'] | default(hostvars[host]['ansible_default_ipv4']['address'])) }}:{{ kube_apiserver_port }}{% if not loop.last %},{% endif %}{% endfor %}" {% endif %} # The address for the info server to serve on (set to 0.0.0.0 or "" for all interfaces) -KUBELET_ADDRESS="--address={{ ip | default(0.0.0.0) }}" +KUBELET_ADDRESS="--address={{ ip | default("0.0.0.0") }}" # The port for the info server to serve on # KUBELET_PORT="--port=10250" # You may leave this blank to use the actual hostname