1. 程式人生 > >Haproxy+Keeplived docker重啟

Haproxy+Keeplived docker重啟

docker start haproxy容器id 

#測試是否成功啟動

ping haproxy容器的ip

注意:此時雖然啟動了haproxy,但Keeplived 必須進入haproxy容器中啟動才行

#進入h1容器

docker exec -it h1 bash

#啟動Keepalived

service keepalived start

#宿主機執行ping命令

ping 172.18.0.201