fix: use private network IPs for k3s join and node addressing
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
environment:
|
||||
INSTALL_K3S_VERSION: "{{ k3s_version if k3s_version != 'latest' else '' }}"
|
||||
K3S_TOKEN: "{{ k3s_token }}"
|
||||
command: /tmp/install-k3s.sh server --cluster-init --advertise-address={{ k3s_primary_ip }}
|
||||
command: /tmp/install-k3s.sh server --cluster-init --advertise-address={{ k3s_primary_ip }} --node-ip={{ k3s_node_ip }}
|
||||
when:
|
||||
- not k3s_service.stat.exists
|
||||
- k3s_primary | default(false)
|
||||
@@ -29,13 +29,13 @@
|
||||
environment:
|
||||
INSTALL_K3S_VERSION: "{{ k3s_version if k3s_version != 'latest' else '' }}"
|
||||
K3S_TOKEN: "{{ k3s_token }}"
|
||||
command: /tmp/install-k3s.sh server --server https://{{ k3s_primary_ip }}:6443
|
||||
command: /tmp/install-k3s.sh server --server https://{{ k3s_primary_ip }}:6443 --advertise-address={{ k3s_node_ip }} --node-ip={{ k3s_node_ip }}
|
||||
when:
|
||||
- not k3s_service.stat.exists
|
||||
- not (k3s_primary | default(false))
|
||||
|
||||
- name: Wait for k3s to be ready
|
||||
command: kubectl get nodes
|
||||
command: "{{ (k3s_primary | default(false)) | ternary('kubectl get nodes', 'systemctl is-active k3s') }}"
|
||||
register: k3s_ready
|
||||
until: k3s_ready.rc == 0
|
||||
retries: 30
|
||||
|
||||
Reference in New Issue
Block a user