vrrp_script check_harbor {
        script "/srv/conf/keepalived/check_harbor.sh"
        interval 10   # 间隔时间，单位为秒，默认1秒
        fall 2        # 脚本几次失败转换为失败
        rise 2        # 脚本连续监测成功后，把服务器从失败标记为成功的次数
        timeout 5
        init_fail
} 
global_defs {
        script_user root
        router_id harbor-ha
        enable_script_security
        lvs_sync_daemon ens3 VI_1
}
vrrp_instance VI_1 {
        state  BACKUP
        interface ens3
        virtual_router_id 31    # 如果同一个局域网中有多套keepalive，那么要保证该id唯一   
        priority 50            
        advert_int 1            
        authentication {
                auth_type PASS        
                auth_pass k8s-test
        }
        virtual_ipaddress {
                192.168.122.59
        }
        track_script {
                check_harbor
        }
}
