Rotate the autolock key in Swarm docker cluster
For change the existing key, you first must need to unlock the swarm with the existing key then you can change its key only:
root@Oracle1:/home/sunny/Desktop# docker swarm unlock
Please enter unlock key:
root@Oracle1:/home/sunny/Desktop# docker swarm unlock-key --rotate
Successfully rotated manager unlock key.
To unlock a swarm manager after it restarts, run the `docker swarm unlock`
command and provide the following key:
SWMKEY-1-s9cEOzC6hbCoRwrZpc8gPEbcaNz4t+dX0ClExWKKG2o
Please remember to store this key in a password manager, since without it you
will not be able to restart the manager.