image.png

image.png

image.png

部署

运行swarm manager

在主机centos linux 2

登记IP
docker swarm init —advertise-addr=10.211.55.6

image.png

  1. docker swarm join \
  2. --token SWMTKN-1-68kq2dnjsb32ixgqfpme1jju2ifn6h8q66msd5xujl8nc6xv8k-5o2a9080l170r557frvujgnuf \
  3. 10.211.55.6:2377

运行swarm worker 1

打开centos linux k8s
运行上面的shell
image.png
This node joined a swarm as a worker.

运行swarm worker 2

打开centos linux 2
运行上上面的shell
image.png
This node joined a swarm as a worker.

查看各节点状态

可以在swarm manage中查看
docker node ls
image.png