gpt4 book ai didi

docker - 一旦部署了群集集群,就需要 'local' vm吗?

转载 作者:行者123 更新时间:2023-12-02 19:38:47 25 4
gpt4 key购买 nike

根据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 called Swarm mode available since Docker 1.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
  • 直接查询服务发现URL以生成 token :
    curl -X POST "https://discovery.hub.docker.com/v1/clusters"
  • 关于docker - 一旦部署了群集集群,就需要 'local' vm吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41125329/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com