Hi I've lost the docker swarm key. I know it can't be recovered. However Is there a way to delete existing swarm at least ? Or would I be not able to use that machine with docker ever again ?
Asked
Active
Viewed 139 times
1 Answers
0
Based on the documentation there is a parameter called --force-new-cluster. This could help in your case since it says it force creates new cluster from current state. (Im not 100% sure about the key).
"Nuke it" is always an option. That means you stop the docker process
systemctl stop docker
and then you remove the contents of the /var/lib/docker/swarm (or docker_base_location/swarm). And then restart the dockerdaemon:
systemctl start docker
and then you should be able to simply create new swarm with docker swarm init command

matic1123
- 914
- 6
- 15
-
Yes --force-new-cluster could help create a new cluster, However the new docker swarm shows errors in it while creating new service or accessing anything in it. Any idea what could be the issue ? Thanks – axel Jun 16 '22 at 03:24
-
Do you have any more details on the error itself? – matic1123 Jun 30 '22 at 05:44