moby / swarmkit

A toolkit for orchestrating distributed systems at any scale. It includes primitives for node discovery, raft-based consensus, task scheduling and more.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for IPv6 Swarm cluster

gabrielmocan opened this issue · comments

Currently, we can create a cluster with only IPv6, nodes see themselves, but containers on different nodes won't talk to each other.

There are plans to support ipv6-only clusters?

Afaik there is loft issues in Docker with IPv6 even without swarm mode so those need to be fixed first: https://github.com/moby/moby/issues?q=is%3Aissue+is%3Aopen+ipv6

They looks to be refactoring libnetwork code at the moment and some of those like
moby/moby#43033 are also IPv6 related.

What you most likely can do is use non-overlay networks https://docs.docker.com/engine/reference/commandline/network_create/#swarm-networks-with-local-scope-drivers

Personally I would:

  • Use bridge driver in way that each node have its own subnet and static routes on nodes to those.
    • and use options -o com.docker.network.bridge.enable_ip_masquerade=false -o com.docker.network.endpoint.dnsservers=<external dns IP> when creating those host specific configs.
  • Remove ingress network totally

Then routing between containers should works but you need figure out some alternative for DNS.

@olljanat thanks for tips and feedback. But as this is not a showstopper for me (as of now, but with IPv4 depletion, IPv6 will be mandatory for any software solution) I can survive for a little longer while libnetwork is being reworked. I'll keep watching this development and test it out as soon as we got something. Idk if its the case of closing this issue or let it open while libnetwork revamp is on course.

@gabrielmocan AFAIK there's nothing needed on swarmkit side to make Docker Swarm compatible with IPv6 since swarmkit doesn't take care of networking. So I think this issue can be safely closed.

As @olljanat said, there's a lot of work needed on libnetwork side to make it fully compatible with IPv6 (including for the overlay driver). Some of that work will hopefully happen in the upcoming months and we'll need community feedback to make sure it fits best everyone's needs.

Okay then @akerouanton , I'm closing this issue but will keep an eye on updates for further testing when the time comes.

Thanks!