kube-proxy loadbalancing, need an external loadbalancer

This commit is contained in:
Smaine Kahlouch
2015-12-15 15:20:08 +01:00
parent 4055980ce6
commit 953f482585
5 changed files with 30 additions and 14 deletions

View File

@@ -10,12 +10,9 @@ subjectAltName = @alt_names
DNS.1 = kubernetes
DNS.2 = kubernetes.default
DNS.3 = kubernetes.default.svc.{{ dns_domain }}
DNS.4 = {{ apiserver_loadbalancer_domain_name }}
{% for host in groups['kube-master'] %}
IP.{{ loop.index }} = {{ hostvars[host]['ip'] | default(hostvars[host]['ansible_default_ipv4']['address']) }}
{% endfor %}
{% set idx = groups['kube-master'] | length | int + 1 %}
IP.{{ idx | string }} = {{ kube_apiserver_ip }}
{% if loadbalancer_address is defined | default('') %}
{% set idx = idx | int + 1 %}
IP.{{ idx | string }} = {{ loadbalancer_address }}
{% endif %}