From 72ab34f2105c30185a7f84ee8ee44a52fd6f7ccc Mon Sep 17 00:00:00 2001 From: Daniel Leining Date: Fri, 1 Jul 2016 18:28:28 -0400 Subject: [PATCH] Add --bind-address to kube-apiserver --- roles/kubernetes/master/templates/kube-apiserver.j2 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/roles/kubernetes/master/templates/kube-apiserver.j2 b/roles/kubernetes/master/templates/kube-apiserver.j2 index c74f80723..7ed979d66 100644 --- a/roles/kubernetes/master/templates/kube-apiserver.j2 +++ b/roles/kubernetes/master/templates/kube-apiserver.j2 @@ -29,6 +29,9 @@ KUBE_SERVICE_ADDRESSES="--service-cluster-ip-range={{ kube_service_addresses }}" # Location of the etcd cluster KUBE_ETCD_SERVERS="--etcd_servers={% for host in groups['etcd'] %}http://{{ hostvars[host]['access_ip'] | default(hostvars[host]['ip'] | default(hostvars[host]['ansible_default_ipv4']['address'])) }}:2379{% if not loop.last %},{% endif %}{% endfor %}" +# Bind address for secure endpoint +KUBE_API_ADDRESS="--bind-address={{ ip | default(ansible_default_ipv4.address) }}" + # default admission control policies KUBE_ADMISSION_CONTROL="--admission_control=NamespaceLifecycle,NamespaceExists,LimitRanger,SecurityContextDeny,ServiceAccount,ResourceQuota"