Docker Swarm
使用docker swarm集群
- 创建manager节点
$ docker swarm init --advertise-addr 192.168.137.218
Swarm initialized: current node (rcanhy10o17svw6guzd6ie8o5) is now a manager.
To add a worker to this swarm, run the following command:
$ docker swarm join --token SWMTKN-1--*** 192.168.137.218:2377
To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions.
- 创建worker节点
docker swarm join --token SWMTKN-1--*** 192.168.137.218:2377
- 查看节点
docker node ls
4. 删除节点
docker node rm <ID>