码头工人群体是否具有可识别容器的负载均衡器? [英] Is docker swarm a container aware load balancer?

查看:91
本文介绍了码头工人群体是否具有可识别容器的负载均衡器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

6个节点docker swarm(集群)-3个mgrs,3个工作人员

6 node docker swarm(cluster) - 3 mgrs, 3 workers

在运行以下命令后:

     docker service create --name psight -p 8080:8080 --replicas 5 <image>

我们看到,mgr3不能运行任务(如下所示)

We see that, mgr3 does not run the task(shown below)

$ docker service ps psight1                                                                          
ID   NAME     IMAGE   NODE   DESIRED_STATE   CURRENT_STATE     ERROR        PORTS                                                        
yoj  psight.1  image   wrk2      Running    Running 19 minutes ago                                                                                    
sjb  psight.2  image   wrk3      Running    Running 19 minutes ago                                                                                    
vv6  psight.3  image   mgr1      Running    Running 19 minutes ago                                                                                    
scf  psight.4  image   mgr2      Running    Running 19 minutes ago                                                                                    
7i2  psight.5  image   wrk1      Running    Running 19 minutes ago 


但是


but,

可以从mgr3获得服务吗?处于实际状态(上方)

Can service be available from mgr3? with actual state(above)

推荐答案

只要mgr3reachable作为管理员(请参考

As long as the mgr3 is reachable as a manager (ref. Monitor swarm health) then it should be able to perform the usual tasks of a manager.

如果您的实例通过公共IP在广域网中公开,并且ssh向世界开放(例如0.0.0.0/0::/0),并且您具有ssh密钥,那么您应该能够连接到实例.

If your instances are expose on the wide area network with a public IP, with ssh open to the world (e.g. 0.0.0.0/0, ::/0) and that you have you ssh key then you should be able to connect to the instance.

这篇关于码头工人群体是否具有可识别容器的负载均衡器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆