Docker Community Forums

Share and learn in the Docker community.

Get swarm join tokens via API


(Tom Taylor) #1

I’m trying to automate the bootstrapping of swarm clusters via the API but I’m struggling on how to get the tokens. I can see all the methods for joining/leaving but nothing that will return the current tokens.

My reference is

At present, the only way I can see to get the tokens is to run the docker CLI and “scrape” the output but that is a bit too ugly for production.