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

@@ -8,6 +8,14 @@
when: hostvars[item].ansible_default_ipv4.address is defined
with_items: groups['all']
- name: populate kubernetes loadbalancer address into hosts file
lineinfile:
dest: /etc/hosts
regexp: ".*{{ apiserver_loadbalancer_domain_name }}$"
line: "{{ loadbalancer_apiserver.address }} lb-apiserver.kubernetes.local"
state: present
when: loadbalancer_apiserver is defined
- name: clean hosts file
lineinfile:
dest: /etc/hosts