0

I would like to get the swarm manager node name or ip address from an host that is not part of the swarm.

The host is Jenkins and I have SSH keys configured to get access to every machine in the swarm, but to create a service I need to run the command on the manager.

What approach is the best to get one of the active swarm manager name or address?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62

1 Answers1

0

I think when You hardcode the ip address it would be the least flexible way. Hostname, assume you have your dns setup working, will give you the flexibility to change the underlaying ip via dns records not modifying your jenkins jobs.

I'm in similar situation, but I wanted the solution without ssh-ing to the manager host. Looks like current docker pipeline does not support swarm mode at all.