Docker Community Forums

Share and learn in the Docker community.

Adding nodes to existing Swarm cluster


(Hannu Visti) #1

Hi all,

I am currently experimenting with Swarm. I can create a working cluster by following these steps:

  1. swarm create
  2. swarm join --advertise in node 1
  3. swarm join --advertise in node 2
  4. swarm join --advertise in node 3
  5. swarm manage in manager node

However, after running swarm manage, if I try
6) swarm join --advertise in node 4

the node starts but never registers itself to the manager node, and never becomes active in the cluster. I have never been able to add to an existing cluster anything after I have run swarm manage.

Is this how it is supposed to be? Should it work and I am doing something wrong? Is this a bug or a feature

Hannu


(Dvohra) #2

The command to join a swarm agent to a swarm manager is
docker run -d swarm join --addr=<node_ip:2375> token://<cluster_id>