How can I use a docker swarm mode manager behind a floating IP

好久不见. 提交于 2019-12-05 02:50:19

问题


Some providers, such as ScaleWay will give your server an IP that is not attached to a local interface on the box.

# docker swarm init --advertise-addr <my-external-ip>:2377 --listen-addr 0.0.0.0:2377
Error response from daemon: must specify a listening address
because the address to advertise is not recognized as a system address

While

# docker swarm init --advertise-addr eth0:2377

will advertise a private IP address.

How is docker swarm supposed to be setup in such an environment?


回答1:


There is an issue with native swarm mode, when it comes to binding to a non system IP Address as docker 1.12.5. There has been multiple github issues, but the problem still persists.

To define non system IP Address: IP Addresses used with technologies like DNAT. These IP Addresses are not set on local interface and visible to underlying operating system.

sources: link1, link2, link3.



来源:https://stackoverflow.com/questions/41405221/how-can-i-use-a-docker-swarm-mode-manager-behind-a-floating-ip

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!