标签:oba top name download docker overlay 建立 releases http
etcd实现分布是存储,然后让通信等数据共享。
步骤:
安装etcd
docker重启加载etcd参数
建立docker overlay网络验证跨主机通信
准备:两台安装了docker 的linux主机
安装etcd
重启docker加载etcd
检查cluster状态 ubuntu@docker-node2:~/etcd-v3.0.12-linux-amd64$ ./etcdctl cluster-health member 21eca106efe4caee is healthy: got healthy result from http://192.168.205.10:2379 member 8614974c83d1cc6d is healthy: got healthy result from http://192.168.205.11:2379 cluster is healthy ## 重启docker服务 在docker-node1上 $ sudo service docker stop $ sudo /usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock --cluster-store=etcd://192.168.205.10:2379 --cluster-advertise=192.168.205.10:2375& 在docker-node2上 $ sudo service docker stop $ sudo /usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock --cluster-store=etcd://192.168.205.11:2379 --cluster-advertise=192.168.205.11:2375&
创建docker overlay网络验证通信
在docker-node1上创建一个demo的overlay network ubuntu@docker-node1:~$ sudo docker network ls NETWORK ID NAME DRIVER SCOPE 0e7bef3f143a bridge bridge local a5c7daf62325 host host local 3198cae88ab4 none null local ubuntu@docker-node1:~$ sudo docker network create -d overlay demo 3d430f3338a2c3496e9edeccc880f0a7affa06522b4249497ef6c4cd6571eaa9 ubuntu@docker-node1:~$ sudo docker network ls NETWORK ID NAME DRIVER SCOPE 0e7bef3f143a bridge bridge local 3d430f3338a2 demo overlay global a5c7daf62325 host host local 3198cae88ab4 none null local
在docker-node2上也看到一个demo的overlay network
ubuntu@docker-node2:~$ sudo docker network ls NETWORK ID NAME DRIVER SCOPE 0e7bef3f143a bridge bridge local 3d430f3338a2 demo overlay global a5c7daf62325 host host local 3198cae88ab4 none null local
标签:oba top name download docker overlay 建立 releases http
原文地址:https://www.cnblogs.com/soymilk2019/p/13109616.html