Set up a virtual IP on proxmox cluster
apt update
apt install keepalived -y
nano /etc/keepalived/keepalived.conf
run this on all nodes
on the master node add this to the keepalived.conf
vrrp_instance VI_1 {
state MASTER
interface vmbr0
virtual_router_id 51
priority 150
advert_int 1
authentication {
auth_type PASS
auth_pass supersecret
}
virtual_ipaddress {
192.168.1.50/24
}}
on the slave nodes add this to keepalived.conf
vrrp_instance VI_1 {
state BACKUP
interface vmbr0
virtual_router_id 51
priority 100
advert_int 1
authentication {
auth_type PASS
auth_pass supersecret
}
virtual_ipaddress {
192.168.1.50/24
}}
Must match exactly:
virtual_router_idauth_pass- IP + subnet
Enable and start keepalived on nodes
systemctl enable –now keepalived