zoukankan      html  css  js  c++  java
  • docker swarm-mode

    root@node1:~# docker version
    Client:
    Version: 1.12.3
    API version: 1.24
    Go version: go1.6.3
    Git commit: 6b644ec
    Built: Wed Oct 26 21:39:03 2016
    OS/Arch: linux/amd64

    Server:
    Version: 1.12.3
    API version: 1.24
    Go version: go1.6.3
    Git commit: 6b644ec
    Built: Wed Oct 26 21:39:03 2016
    OS/Arch: linux/amd64

    --- master ---

    root@node1:~# docker swarm init --advertise-addr 172.18.0.78
    Swarm initialized: current node (32qkctttt899iri46ljh4cobs) is now a manager.

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

    docker swarm join
    --token SWMTKN-1-0001dwbbgz9q4m1qelrmvm9w6yf6ldt6df6yl547s73hy5jd5n-50gpz8hqcs95tqqaumfmxcfo8
    172.18.0.78:2377

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

    --- worker ---

    root@node1:~# docker swarm join
    --token SWMTKN-1-0001dwbbgz9q4m1qelrmvm9w6yf6ldt6df6yl547s73hy5jd5n-50gpz8hqcs95tqqaumfmxcfo8
    172.18.0.78:2377

    --- command ---

    (退出 swarm)

    docker swarm leave --force

    查看节点列表
    docker node ls

    节点升级为manager
    docker node promote

    节点降级worker
    docker node demote

    查看节点详细信息
    docker node inspect

    删除一个节点
    docker node rm

    可以查看节点上运行的任务task
    docker node tasks

    可以更新一个节点
    docker node update

  • 相关阅读:
    【u026】花园(garden)
    【BZOJ 1040】[ZJOI2008]骑士
    【t100】汤姆斯的天堂梦
    【BZOJ 1038】[ZJOI2008]瞭望塔
    【t096】树的序号
    Java Web整合开发(82)
    2 HTML解析
    T3186 队列练习2 codevs
    T3185 队列练习1 codevs
    T1191 数轴染色 codevs
  • 原文地址:https://www.cnblogs.com/yuan1978/p/6249392.html
Copyright © 2011-2022 走看看