roadmap icon indicating copy to clipboard operation
roadmap copied to clipboard

macvlan/ipvlan/overlay network fix ip addresses in swarm clusters

Open MK796 opened this issue 1 year ago • 2 comments

Tell us about your request Make the three mentioned network types compatible with swarm.

Which service(s) is this request for? Docker Swarm

Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard? Actual state is inflexible.

Yes I now what the original goals were for swarm. But some use cases need fix IPs within the hosts network or within an overlay network. Not every service is able to run "clustered".

The actual state somehow counteracts the swarm cluster purpose.

Are you currently working around the issue? An extremely inelegant combination of keepalived and a lb for example haproxy is needed to achieve host level fix IPs for containers.

Getting fix IPs in an overlay network is almost impossible.

Additional context Close the gap between docker standalone and swarm networking features and integration.

MK796 avatar Jan 03 '25 22:01 MK796

Any news on this ? I'm also interested in your workaround on this issue @MK796 ,I need fix IP's in my Swarm hosts network for my postfix containers.

nmateo avatar Sep 05 '25 10:09 nmateo

Hello @nmateo,

There isn't THAT work around just yet... I use keepalived to get a fix IP, that moves with the nodes state (host level). I intentionally avoid using a lb because that would again create a single point of failure. The overlay network as well as service or container name based dns is also working pretty good so far. Thats makes the swarm internal communication pretty straight forward.

Long story short, it's still not possible to assign ipvlan/macvlan IPs to a via swarm deployed service.

You have to use a clever combination of all mentioned...

MK796 avatar Sep 05 '25 12:09 MK796