三台linux主机
manager:192.168.100.151
work1:192.168.100.156
work2:192.168.100.157
manager
docker swarm init --advertise-addr=192.168.100.151
会产生一个join-token:
To add a manager to this swarm, run the following command:
docker swarm join --token SWMTKN-1-17o3nuwv15qcg7f3omsxslb110nr54ndz4otwpjub6g9z18mdk-12aaimdkubrbm7j49pyd8xwo8 192.168.100.151:2377
work1
docker swarm join --token SWMTKN--17o3nuwv15qcg7f3omsxslb110nr54ndz4otwpjub6g9z18mdk-12aaimdkubrbm7j49pyd8xwo8 192.168.100.151:
work2
docker swarm join --token SWMTKN--17o3nuwv15qcg7f3omsxslb110nr54ndz4otwpjub6g9z18mdk-12aaimdkubrbm7j49pyd8xwo8 192.168.100.151:
可能会产生这样的一个错误:certificate has expired or is not yet valid
时间不同步造成的,解决参照:https://www.cnblogs.com/soymilk2019/p/11597146.html