Verified Commit 8459d474 authored by Hugo's avatar Hugo
Browse files

use lb internal ip

parent 179dccd8
......@@ -11,3 +11,9 @@
- name: fetch kubeconfig
shell: k0sctl kubeconfig --disable-telemetry > kubeconfig
when: k0sctlConfig.changed
- name: replace ip in kubeconfig
ansible.builtin.replace:
path: kubeconfig
regexp: "{{cluster.api.privateIp | regex_escape()}}"
replace: "{{cluster.api.publicIp}}"
......@@ -12,9 +12,3 @@
- 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,13 +20,10 @@ spec:
name: {{cluster.name}}
spec:
api:
externalAddress: {{cluster.api.address}}
externalAddress: {{cluster.api.privateIp}}
sans:
- {{cluster.api.address}}
- {{cluster.api.privateIp}}
storage:
etcd:
peerAddress: {{cluster.api.privateIp}}
- {{cluster.api.publicIp}}
network:
provider: calico
calico:
......
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