treasuremap/manifests/function/k8scontrol-ha/vrrp_keepalived_patch.yaml

34 lines
967 B
YAML

- op: add
path: "/spec/kubeadmConfigSpec/files/-"
value:
path: /etc/keepalived/keepalived.conf
content: |
! Configuration File for keepalived
global_defs {
}
vrrp_instance KUBERNETES {
state BACKUP
interface REPLACEMENT_INTERFACE_1
virtual_router_id 101
priority 101
advert_int 1
virtual_ipaddress {
REPLACEMENT_VIP_1
}
}
vrrp_instance INGRESS {
state BACKUP
interface REPLACEMENT_INTERFACE_2
virtual_router_id 102
priority 102
advert_int 1
virtual_ipaddress {
REPLACEMENT_VIP_2
}
}
- op: add
path: "/spec/kubeadmConfigSpec/preKubeadmCommands/-"
value:
apt-get update && apt-get install -y bridge-utils keepalived ipset ipvsadm
systemctl enable --now keepalived