码迷,mamicode.com
首页 > 其他好文 > 详细

docker swarm

时间:2019-12-23 00:40:28      阅读:75      评论:0      收藏:0      [点我收藏+]

标签:val   信息   local   img   Kubernete   查看   and   man   OWIN   

上次安装完了docker,继续探索swarm,Swarm和Kubernetes比较类似,但是更加轻,具有的功能也较kubernetes更少一些。

先安装完docker

技术图片

 

 

 

1、机器10.100.25.83上:

初始化一个Swarm群集:docker swarm init

[root@ecsnpmeybwpxc-no yum.repos.d]# docker swarm init
Swarm initialized: current node (puaz9qdi3bkxak3w4gly2fjxg) is now a manager.

To add a worker to this swarm, run the following command:

    docker swarm join     --token SWMTKN-1-0kuf7ygj39r5g0gy5jsmdt99viykg8b7jb5j52hu3ipn1sq3ww-831xku6gv525oy3o07wncdsk1     10.100.25.83:2377

To add a manager to this swarm, run docker swarm join-token manager and follow the instructions.

2、机器10.100.25.13上:

[root@prodgateway-no ~]# docker swarm join >     --token SWMTKN-1-0kuf7ygj39r5g0gy5jsmdt99viykg8b7jb5j52hu3ipn1sq3ww-831xku6gv525oy3o07wncdsk1 >     10.100.25.83:2377
This node joined a swarm as a worker.

3、在 manager 端10.100.25.83查看 swarm 节点信息

[root@ecsnpmeybwpxc-no ~]# docker node ls
ID                           HOSTNAME                       STATUS  AVAILABILITY  MANAGER STATUS
puaz9qdi3bkxak3w4gly2fjxg *  ecsnpmeybwpxc-no.01.novalocal  Ready   Active        Leader
tzu5x27v5a3rqnmglh15z1cx9    prodgateway-no.05.novalocal    Ready   Active        

节点2台机器都展示了

关于swarm怎么使用及监控,待续

 

docker swarm

标签:val   信息   local   img   Kubernete   查看   and   man   OWIN   

原文地址:https://www.cnblogs.com/mabiao008/p/12081660.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!