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

docker 1.12之swarm集群

时间:2016-08-02 17:23:13      阅读:153      评论:0      收藏:0      [点我收藏+]

标签:docker

创建一个swarm

docker swarm init --advertise-addr host-ip:port 


[docker@jiuyang ~]$ docker swarm init --advertise-addr 192.168.1.50:2377

Swarm initialized: current node (ea10vrd84vnb3u9wx5phhv00i) is now a manager.


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

    docker swarm join \

    --token SWMTKN-1-0asyg1kccwit36msyfmxwzzku6z84g5ay7fjwbhpr7lu6v8fy2-40e90q4svhrs4v07rsfthrj19 \

    192.168.1.50:2377


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

    docker swarm join \

    --token SWMTKN-1-0asyg1kccwit36msyfmxwzzku6z84g5ay7fjwbhpr7lu6v8fy2-2ob66mmq9iedd2n1hogry6xqf \

    192.168.1.50:2377


退出swarm  : docker swarm leave


查看swarm 节点 : docker node  ls


查看某个节点: docker node inspect self --pretty


drain一个节点: docker node update --availability drain node-1


docker 1.12之swarm集群

标签:docker

原文地址:http://xiamin.blog.51cto.com/11258876/1833466

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