ha.yaml hinzugefügt

This commit is contained in:
2025-01-03 17:24:53 +01:00
parent 3e2bd56ead
commit 1ada16b50a

27
ha.yaml Normal file
View File

@@ -0,0 +1,27 @@
---
- name: Build a cluster with HA control plane
hosts: k3s_cluster
vars:
k3s_become_for_all: true
k3s_etcd_datastore: true
k3s_use_experimental: true # Note this is required for k3s < v1.19.5+k3s1
k3s_server:
advertise-address: "{{ ansible_eth0.ipv4.address }}"
bind-address: 0.0.0.0
datastore-endpoint: "mysql://USERNAME:PASSWORD@tcp(192.168.15.25:3306)/k3s"
write-kubeconfig-mode: 644
node-external-ip: "{{ ansible_eth0.ipv4.address }}"
# cluster-cidr: 172.20.0.0/16
# flannel-backend: 'none' # This needs to be in quotes
disable:
- traefik
- servicelb
k3s_agent:
node-ip: "{{ ansible_eth0.ipv4.address }}"
node-external-ip: "{{ ansible_eth0.ipv4.address }}"
roles:
- role: xanmanning.k3s