Deploys kube-vip as a DaemonSet on all k3s server nodes, advertising a VIP (192.168.20.2) via ARP. Eliminates the single-point-of-failure k3s-loadbalancer VM. - New kube_vip role: RBAC + DaemonSet templates, TLS SAN cert rotation - playbooks/kube-vip.yaml: migration playbook (serial=1, idempotent) - Updated k3s install tasks (server primary/secondary, agent) to use k3s_vip instead of the loadbalancer VM IP - Added k3s_vip: 192.168.20.2 to group_vars (below DHCP range .11-.250) Migration steps in playbook header comment.
14 lines
506 B
YAML
14 lines
506 B
YAML
k3s:
|
|
loadbalancer:
|
|
default_port: 6443
|
|
|
|
k3s_vip: "192.168.20.2"
|
|
|
|
k3s_primary_server_ip: "{{ groups['k3s_server'] | map('extract', hostvars, 'ansible_default_ipv4') | map(attribute='address') | unique | list | first }}"
|
|
k3s_server_ips: "{{ groups['k3s_server'] | map('extract', hostvars, 'ansible_default_ipv4') | map(attribute='address') | unique | list }}"
|
|
|
|
k3s_server_name: "k3s.{{ internal_domain }}"
|
|
k3s_cluster_name: homelab
|
|
k3s_user_name: "{{ user }}"
|
|
k3s_context_name: "{{ k3s_cluster_name }}"
|