I am aware that we can initialize a swarm using
docker swarm init
If the Node has multiple addresses then we need to add flag
--advertise-addr
and provide the IP Address . This flag is for mentioning the IP address to other Nodes in the swarm for API Access.
In a cluster of 5 manager node . MGR1 is the leader ( In this node I ran
docker swarm init --advertise-addr 192.6.2.2
) . Now If I delete this Node , the cluster will appoint another manager as leader by RAFT .
My question is , If that manager node which is going to be elected as leader has more than one IP address . Then how a single IP is set like the way --advertise-addr is used at first to initialize the cluster. ?