These are just some articles that i came across while researching the issues with the core
network on staging swarm running out of IPs.
- Article about how to build networking in docker swarm.
https://success.docker.com/article/networking
- Docker network/ip analisys util
https://github.com/docker/ip-util-check - This was recommended by some people in the docker slack community, but it basically only counted the IPs in use, as advertised by running containers. (As far as i could tell)
- IPAM network driver
https://github.com/docker/libnetwork/blob/master/docs/ipam.md
- Swarm tasks stuck in new state
- IP allocation issues after node crashed
- Swarm mode at scale
I really recommend joining the Docker slack community. They are really helpful and a good source of advice :)