using ip address instead of inventory_hostname for kube-proxy

This commit is contained in:
Smaine Kahlouch 2015-12-17 10:43:06 +01:00
parent b3841659d7
commit 9914229484

View file

@ -18,7 +18,7 @@ spec:
{% if loadbalancer_apiserver is defined and apiserver_loadbalancer_domain_name is defined %} {% if loadbalancer_apiserver is defined and apiserver_loadbalancer_domain_name is defined %}
- --master=https://{{ apiserver_loadbalancer_domain_name }}:{{ loadbalancer_apiserver.port }} - --master=https://{{ apiserver_loadbalancer_domain_name }}:{{ loadbalancer_apiserver.port }}
{% else %} {% else %}
- --master=https://{{ groups['kube-master'][0] }}:{{ kube_apiserver_port }} - --master=https://{{ hostvars[groups['kube-master'][0]]['ip'] | default(hostvars[groups['kube-master'][0]]['ansible_default_ipv4']['address']) }}:{{ kube_apiserver_port }}
{% endif%} {% endif%}
- --kubeconfig=/etc/kubernetes/node-kubeconfig.yaml - --kubeconfig=/etc/kubernetes/node-kubeconfig.yaml
{% endif %} {% endif %}