简体   繁体   English

docker swarm 为一个节点中的所有副本提供服务

[英]docker swarm service all replicas in one node

I created a swarm with 4 node, 2 manager, 2 worker.我创建了一个有 4 个节点、2 个管理器、2 个工作人员的 swarm。 one of the manager is in drain mode.其中一位经理处于排水模式。 i am running 3 replicas of an nginx based web app built using vue.js only, no backend, no db.我正在运行基于 nginx 的 web 应用程序的 3 个副本,该应用程序仅使用 vue.js 构建,无后端,无数据库。 now when i run the docker service ls command, i get the following:现在当我运行docker service ls命令时,我得到以下信息:

$ docker service ls
ID                  NAME                  MODE                REPLICAS  
4nk9b9zm3rlp        friendly_hugle        replicated          0/3                    
qwqj07gu03zu        intelligent_khayyam   replicated          0/3                    
37tol0zrs82n        strange_hodgkin       replicated          0/3                    
dvl4r0vimqtd        suspicious_greider    replicated          3/3                   

why all my replicas are running on one node (3/3)?为什么我所有的副本都在一个节点上运行(3/3)? Just started learning docker.刚开始学习docker。

run the command,Check whether the running node is in normal state,运行命令,查看运行节点是否正常 state,

docker node ls
docker service ps strange_hodgkin

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM