Docker Community Forums

Share and learn in the Docker community.

Docker Overlay Network Without Swarm

Hi everyone,

I’m trying to create overlay network without using swarm mode;

When I try to create the network after required steps (up and running key-value storage and configure the daemon accordingly) it says this is “This node is not a swarm manager”.

I use docker version : 19.03.13 on CentOS 8.1.1911

All the examples for this practice nearly 4-5 years old, and official docker documentation (v17.09) has this part but current one has not.

Could this option be deprecated? Which means we can use overlay network only on swarm mode. If so is there any documentation/proof would you share with me?

If this is still open option what would you suggest to achieve that?

Thank you

This kind of reminds me to a “let me google this for you” request.

Well, I did and here is the outcome of the first result for “overlay docker network”:

Why would someone even want to use overlay networks for a single node setup!?

Yeah, it seems "let me google this for you’ type of request.

But as you see even google not capable give the proper answer for that, I never involved any docker network related configuration before so I thought some historical information would be useful as all the previous versions of docker doc. is not available.

So for last question we don’t want to add additional context if we don’t need.

Hi again,

This is from the current documentation;

“Before you can create an overlay network, you need to either initialize your Docker daemon as a swarm manager using docker swarm init or join it to an existing swarm using docker swarm join . Either of these creates the default ingress overlay network which is used by swarm services by default. You need to do this even if you never plan to use swarm services. Afterward, you can create additional user-defined overlay networks.”

So it seems you can’t create overlay network without swarm mode.

Thanks

Yup.

Though, you can always execute docker swarm init and initiate a single master swarm cluster - which is a valid cluster from the perspective of swarm. This might make sense on developer machines, if the production is using a multi-node swarm cluster. If this is not the case, then just initiating a swarm to use overlay networks is unnecessary overhead without any benefits.