💓
Networking & Server

Keepalived

High availability with VRRP floating IP failover

🐧 Linux🍎 Mac🪟 Windows
Reviewed: Tested on: Kubernetes 1.29 · Terraform 1.8 · Ubuntu 22.04

What is this?

Keepalived provides a floating IP that moves to a backup server if the primary fails.

📁

Config files for Keepalived

Where to create or edit the main configuration — paths below match the setup steps.

  • /etc/keepalived/keepalived.conf

    Location: Keepalived node

    VRRP virtual IP and health checks

📥

Step 01

Install Keepalived

(01)Install Keepalived

Linux
1sudo apt-get install -y keepalived
2sudo systemctl enable keepalived
⚙️

Step 02

Configure Keepalived

(01)Configure Keepalived

Linux
1sudo nano /etc/keepalived/keepalived.conf
2# Configure virtual_ipaddress and priority
3sudo systemctl start keepalived

Step 03

Verify

(01)Verify installation

Linux
1ip addr show | grep inet
2sudo systemctl status keepalived