30 lines
517 B
Plaintext
30 lines
517 B
Plaintext
! /etc/keepalived/keepalived.conf
|
|
! Configuration File for keepalived
|
|
global_defs {
|
|
router_id LVS_DEVEL
|
|
}
|
|
vrrp_script check_apiserver {
|
|
script "/etc/keepalived/check_apiserver.sh"
|
|
interval 3
|
|
weight -2
|
|
fall 10
|
|
rise 2
|
|
}
|
|
|
|
vrrp_instance VI_1 {
|
|
state MASTER
|
|
interface ens33
|
|
virtual_router_id 151
|
|
priority 255
|
|
authentication {
|
|
auth_type PASS
|
|
auth_pass Password
|
|
}
|
|
virtual_ipaddress {
|
|
192.168.4.100/24
|
|
}
|
|
track_script {
|
|
check_apiserver
|
|
}
|
|
}
|