global_defs { router_id haborlb } vrrp_sync_groups VG1 { group { VI_1 } } #Please change "ens160" to the interface name on you loadbalancer hosts. #In some case it will be eth0, ens16xxx etc. vrrp_instance VI_1 { interface ens160 track_interface { ens160 } state MASTER virtual_router_id 51 priority 10 virtual_ipaddress { /32 } advert_int 1 authentication { auth_type PASS auth_pass d0cker } } ########## Section for Harbor use HTTP protocol ###################### #Please change , , to real ip address virtual_server 80 { delay_loop 15 lb_algo rr lb_kind DR protocol TCP nat_mask 255.255.255.0 persistence_timeout 10 real_server 80 { weight 10 MISC_CHECK { misc_path "/usr/local/bin/check.sh " misc_timeout 5 } } real_server 80 { weight 10 MISC_CHECK { misc_path "/usr/local/bin/check.sh " misc_timeout 5 } } } #########################End of HTTP############################ ##########################HTTPS################################# #Please uncomment the follow when harbor running under https #virtual_server 443 { # delay_loop 15 # lb_algo rr # lb_kind DR # protocol TCP # nat_mask 255.255.255.0 # persistence_timeout 10 # # real_server 443 { # weight 10 # MISC_CHECK { # misc_path "/usr/local/bin/check.sh " # misc_timeout 5 # } # } # # real_server harbor_node2_ip 443 { # weight 10 # MISC_CHECK { # misc_path "/usr/local/bin/check.sh " # misc_timeout 5 # } # } #} #########################End of HTTPS Section#################