Verified Commit 6c629070 authored by Hugo's avatar Hugo
Browse files

use a dn for api lb

parent bd0007b4
......@@ -17,6 +17,7 @@
state: restarted
tasks:
- import_tasks: "tasks/wait_nodes.yaml"
- import_tasks: "tasks/load-cluster.yaml"
- import_tasks: "tasks/upgrade.yaml"
- import_tasks: "tasks/firewall.yaml"
- import_tasks: "tasks/setup_worker.yaml"
......
- name: Wait for DNS
pause:
prompt: "Make sure {{cluster.api.address}} points to {{cluster.api.publicIp}}"
- name: set node labels
kubernetes.core.k8s:
kubeconfig: kubeconfig
......
......@@ -19,11 +19,6 @@
proto: tcp
comment: ssh
- set_fact:
cluster: "{{ lookup('file', file_path) | from_json }}"
vars:
file_path: "cluster.{{ lookup('env', 'ENV') }}.json"
- name: allow internal traffic
community.general.ufw:
rule: allow
......
- set_fact:
cluster: "{{ lookup('file', file_path) | from_json }}"
vars:
file_path: "cluster.{{ lookup('env', 'ENV') }}.json"
......@@ -12,3 +12,9 @@
- linux-headers-amd64
- linux-image-amd64
notify: reboot
- name: add api address in /etc/hosts
lineinfile:
path: /etc/hosts
search_string: "{{cluster.api.privateIp}}"
line: "{{cluster.api.privateIp}} {{cluster.api.address}}"
......@@ -20,10 +20,10 @@ spec:
name: {{cluster.name}}
spec:
api:
externalAddress: {{cluster.api.publicIp}}
externalAddress: {{cluster.api.address}}
sans:
- {{cluster.api.address}}
- {{cluster.api.privateIp}}
- {{cluster.api.publicIp}}
storage:
etcd:
peerAddress: {{cluster.api.privateIp}}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment