根据Install and Create a Docker Swarm的官方文档,第一步是创建一个名为local的虚拟机,需要使用swarm create
获得 token 。
创建了管理器和所有节点并将其添加到群集集群后,是否需要继续运行本地虚拟机?
最佳答案
Note: this tutorial is for the first version of Swarm (called
Swarm legacy
). There is a new version calledSwarm mode
available since Docker1.12
. Putting it out there because there seems to be a lot of confusion between the two.
不,您不必保留
local
VM,这只是通过Docker Hub发现服务获得唯一的集群 token 。现在,仅生成 token 就有点过头了。您可以通过以下方法绕过此步骤:
Docker for Mac
或更一般地在本地运行的Docker实例,则直接运行swarm容器:docker run --rm swarm create
curl -X POST "https://discovery.hub.docker.com/v1/clusters"
关于docker - 一旦部署了群集集群,就需要 'local' vm吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41125329/