summaryrefslogtreecommitdiff
path: root/roles/kubernetes-master/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/kubernetes-master/tasks')
-rw-r--r--roles/kubernetes-master/tasks/main.yml2
1 files changed, 1 insertions, 1 deletions
diff --git a/roles/kubernetes-master/tasks/main.yml b/roles/kubernetes-master/tasks/main.yml
index f75ec11f..43c21cae 100644
--- a/roles/kubernetes-master/tasks/main.yml
+++ b/roles/kubernetes-master/tasks/main.yml
@@ -17,7 +17,7 @@
register: kubeadm_token_generate
- name: set up kubernetes master
- command: "kubeadm init --pod-network-cidr {{ kubernetes.pod_ip_range }} --service-cidr {{ kubernetes.service_ip_range }} {% if kubernetes.api_extra_sans | length > 0 %}--apiserver-cert-extra-sans {{ kubernetes.api_extra_sans | join(',') }}{% endif %} --token '{{ kubeadm_token_generate.stdout }}' --token-ttl 42m --skip-token-print"
+ command: "kubeadm init --pod-network-cidr {{ kubernetes.pod_ip_range }} --service-cidr {{ kubernetes.service_ip_range }} --apiserver-advertise-address {{ kubernetes.api_advertise_ip | default('0.0.0.0') }} {% if kubernetes.api_extra_sans | length > 0 %}--apiserver-cert-extra-sans {{ kubernetes.api_extra_sans | join(',') }}{% endif %} --token '{{ kubeadm_token_generate.stdout }}' --token-ttl 42m --skip-token-print"
args:
creates: /etc/kubernetes/pki/ca.crt
register: kubeadm_init