Docker swarm¶
The default address pool that Docker Swarm uses for its overlay network is
10.0.0.0/8
. If this pool conflicts with your current network
implementation, you must use a custom IP address pool. Prior to installing MKE,
specify your custom address pool using the --default-addr-pool
option when initializing swarm.
Note
The Swarm default-addr-pool
and MCR default-address-pools
settings
define two separate IP address ranges used for different purposes.
A node.Status.Addr
of 0.0.0.0
can cause unexpected problems. To
prevent any such issues, add the --advertise-addr flag to the
docker swarm join command.
To resolve the 0.0.0.0
situation, initiate the following workaround:
Stop the docker daemon that has
.Status.Addr 0.0.0.0
.In the
/var/lib/docker/swarm/docker-state.json
file, apply the correct node IP toAdvertiseAddr
andLocalAddr
.Start the docker daemon.
Example result:
`{"LocalAddr":"","RemoteAddr":"10.200.200.10:2377","ListenAddr":"0.0.0.0:2377","AdvertiseAddr":"","DataPathAddr":"","DefaultAddressPool":null,"SubnetSize":0,"DataPathPort":0,"JoinInProgress":false,"FIPS":false}`
to
`{"LocalAddr":"10.200.200.13","RemoteAddr":"","ListenAddr":"0.0.0.0:2377","AdvertiseAddr":"10.200.200.13:2377","DataPathAddr":"","DefaultAddressPool":null,"SubnetSize":0,"DataPathPort":0,"JoinInProgress":false,"FIPS":false}