podman安装keepalived

主节点:192.168.56.11

备节点:192.168.56.12

虚拟IP:192.168.56.10

启动主节点:

podman run -d \
--name keepalived \
--net=host \
-e KEEPALIVED_INTERFACE="ens160" \
-e KEEPALIVED_PRIORITY=100 \
-e KEEPALIVED_UNICAST_PEERS="#PYTHON2BASH:['192.168.56.11', '192.168.56.12']" \
-e KEEPALIVED_VIRTUAL_IPS="192.168.56.10" \
-e KEEPALIVED_STATE="MASTER" \
--privileged=true \
registry.cn-guangzhou.aliyuncs.com/maxwoods/keepalived:stable --loglevel debug

启动备节点:

podman run -d \
--name keepalived \
--net=host \
-e KEEPALIVED_INTERFACE="ens160" \
-e KEEPALIVED_PRIORITY=50 \
-e KEEPALIVED_UNICAST_PEERS="#PYTHON2BASH:['192.168.56.11', '192.168.56.12']" \
-e KEEPALIVED_VIRTUAL_IPS="192.168.56.10" \
-e KEEPALIVED_STATE="BACKUP" \
--privileged=true \
registry.cn-guangzhou.aliyuncs.com/maxwoods/keepalived:stable --loglevel debug
© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享