diff --git a/roles/haproxy/templates/haproxy.cfg.j2 b/roles/haproxy/templates/haproxy.cfg.j2 index 904e368..c2f8f78 100644 --- a/roles/haproxy/templates/haproxy.cfg.j2 +++ b/roles/haproxy/templates/haproxy.cfg.j2 @@ -39,3 +39,11 @@ listen https {% for node in groups['kube-workers'] %} server {{node}} {{ hostvars[node]['ansible_host'] }}:443 check fall 3 inter 3s rise 2 {% endfor %} + +listen kubernetes + bind *:6443 + mode tcp + balance roundrobin +{% for node in groups['kube-masters'] %} + server {{node}} {{ hostvars[node]['ansible_host'] }}:6443 check fall 3 inter 3s rise 2 +{% endfor %}