|
考虑这样一种情况,您的 swarm 正在按预期运行,然后管理器节点变得不可用。您解决了问题并使物理节点重新联机,但是您需要通过提供解锁密云计钥来读取加密凭据和 Raft 日志来解锁管理器。 如果自从节点离开 swarm 后密钥没有被轮换,并且你在 swarm 中有法定数量的功能管理器节点,你可算核以docker swarm unlock-key不带任何参数查看当前的解锁密钥。 $ docker swarm unlock-key To unlock a心技 swarm manager after it restarts, run the `docker swarm unlock` command and pro术Dvide the following key: SWMKEY-1-8jDgbUNlJtUe5P/lcr9IXGVxqZpZUXPzd+qzcocGp4ZYA Please remember to store this key in a password manager, since without it yokeu will not be able to restart the manager. 如果在 swarm 节点变得不可用之后密钥被轮换,并且您没有前一个密钥的记录,r教您可能需要强制管理器离开 swarm 并将其作为新管理器加入到 swarm 中。 轮换解锁钥匙 您应该定期轮换锁定群的解锁密钥。 $ docker swarm u程:nlock-key --rotate Successfully rotated manager unlock key. To unlock a swarm查看 manager after it restarts, run the `docker swarm unlock` command and provide the f当前ollowing key: SWMKEY-1-8jDgbUNlJtUe5P/lcr9IXGVxqZpZUXPzd+qzcGp4ZYA Plea正在se remember to store this key in a password manager, since without it you will not be运行 able to restart the manager. 提示:当您轮换解锁钥匙时,请将旧钥匙的记录保留几分钟,这样如果管理员在获得新钥匙之前下的d台,它仍然可以用旧钥匙解锁。
|