How do I set up docker swarm with three servers?

I have three servers like below:


To set up HA, I need 3 manager nodes. I have some questions:

1- Because I need 3 manager nodes, should I run the following command on all three servers?

# docker swarm init --advertise-addr Server-IP

2- Which server should I run the following command on?

# docker swarm join --token <TOKEN> <MANAGER_NODE_IP>:2377

Thank you.

Well they cant all be managers (really) if you want to… yaknow… do anything. You need some workers to actually do the work, otherwise your swarm is kind of pointless.

Did you… read the manual?

1 Like

Thank you so much for your reply.
I know this:

"Manager node" : Maintains cluster management tasks 

"Worker node"  : Receives and executes tasks from the manager node

Which commands should I run on each server? I saw various things on the Internet.

So when you clicked on the manual page and looked around, surely you clicked on the tutorial made by the people who make the product youre using, read the page in its entirity, and answered your own questions based on the text the program gives when you set the swarm up, riiiight?

As you can see, I have the commands, but shouldn’t I have three manager nodes for HA?

So add them. Read. The. Page. (I will give you a hint: The words “To add a manager to this swarm” appear on this page. You should read the words that come after it.)