diff --git a/roles/kubernetes/node/templates/kubelet.kubeadm.env.j2 b/roles/kubernetes/node/templates/kubelet.kubeadm.env.j2 index cbf615063fd830bab2521c302a9c0a2ae61f5461..722f567c27c0744841ec7cd35f3774dd5f465fd4 100644 --- a/roles/kubernetes/node/templates/kubelet.kubeadm.env.j2 +++ b/roles/kubernetes/node/templates/kubelet.kubeadm.env.j2 @@ -5,7 +5,7 @@ KUBE_LOGGING="--logtostderr=true" KUBE_LOG_LEVEL="--v={{ kube_log_level }}" # 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") }} {% if ip is defined %} --node-ip={{ ip }}{% endif %}" # The port for the info server to serve on # KUBELET_PORT="--port=10250" # You may leave this blank to use the actual hostname diff --git a/roles/kubernetes/node/templates/kubelet.standard.env.j2 b/roles/kubernetes/node/templates/kubelet.standard.env.j2 index a7da60e401acd8aeb36b562d7c7bd866c8255c5f..b983aefa50c08091a5d4d3460540a40b088b5295 100644 --- a/roles/kubernetes/node/templates/kubelet.standard.env.j2 +++ b/roles/kubernetes/node/templates/kubelet.standard.env.j2 @@ -2,7 +2,7 @@ KUBE_LOGGING="--logtostderr=true" KUBE_LOG_LEVEL="--v={{ kube_log_level }}" # 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") }} {% if ip is defined %} --node-ip={{ ip }}{% endif %}" # The port for the info server to serve on # KUBELET_PORT="--port=10250" # You may leave this blank to use the actual hostname