• 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

  • 相关阅读:
    mysql5.7编译安装
    web服务部署工具使用介绍
    Clang Static Analyzer
    MySQL中character set与collation
    Linux 编译运行查找头文件和库的顺序
    git入门及使用记录
    CentOS7通过yum安装gdb8 gcc8 g++8的方法
    win10子系统设置开机启动ssh服务
    STL中map的使用
    C++逆序输出字符串
  • 原文地址:https://www.cnblogs.com/yuan1978/p/6249392.html
Copyright © 2020-2023  润新知