What is the extra container with "lb-" prefix in docker swarm network? How to set up docker network not to have that?

Viewed 666

Docker network is created in a docker swarm, which contains several nodes, with this command:

docker network create --attachable --driver overlay [network-name]

And containers are attached to the network with "docker service create" command.

There is extra container with the name "lb-[network-name]" appeared after in the network. What is that container and how to configure docker network not to have that?

1 Answers

From docker swarm documentation (https://docs.docker.com/engine/swarm/key-concepts/):

Swarm mode has an internal DNS component that automatically assigns each service in the swarm a DNS entry. The swarm manager uses internal load balancing to distribute requests among services within the cluster based upon the DNS name of the service.

It's a part of swarm architecture, you can't deactivate it.

Take a look also to this detailed answer regarding networking of docker swarm: https://stackoverflow.com/a/44649746/3730077

Related