-
-
Save krotkiewicz/682068325ef05d16df68d27cb66e9cb3 to your computer and use it in GitHub Desktop.
4.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@node $ export MASTER_IP=10.135.53.41 | |
root@node $ export NODE_IP=10.135.53.41 | |
root@node $ wget -q --show-progress https://github.com/coreos/flannel/releases/download/v0.6.2/flannel-v0.6.2-linux-amd64.tar.gz | |
flannel-v0.6.2-linux-amd64.tar.gz.1 100%[==================================================================================================================================>] 4.51M 1.15MB/s in 3.9s | |
root@node $ tar xzf flannel-v0.6.2-linux-amd64.tar.gz | |
root@node $ mv flanneld mk-docker-opts.sh /usr/local/bin/ | |
root@node $ etcdctl -C http://$MASTER_IP:2379 set /coreos.com/network/config '{"Network": "10.0.0.0/8", "SubnetLen": 20, "SubnetMin": "10.10.0.0","SubnetMax": "10.99.0.0","Backend": {"Type": "vxlan","VNI": 100,"Port": 8472}}' | |
root@node $ flanneld -iface=$NODE_IP -etcd-endpoints http://$MASTER_IP:2379 &> /tmp/flanneld.log & | |
root@node $ mk-docker-opts.sh -d /etc/default/docker | |
root@node $ service docker restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@node2 $ export MASTER_IP=10.135.53.41 | |
root@node2 $ export NODE_IP=10.135.40.58 | |
root@node2 $ wget -q --show-progress https://github.com/coreos/flannel/releases/download/v0.6.2/flannel-v0.6.2-linux-amd64.tar.gz | |
flannel-v0.6.2-linux-amd64.tar.gz 100%[==================================================================================================================================>] 4.51M 1.04MB/s in 4.5s | |
root@node2 $ tar xzf flannel-v0.6.2-linux-amd64.tar.gz | |
root@node2 $ mv flanneld mk-docker-opts.sh /usr/local/bin/ | |
root@node2 $ flanneld -iface=$NODE_IP -etcd-endpoints http://$MASTER_IP:2379 &> /tmp/flanneld.log & | |
root@node2 $ mk-docker-opts.sh -d /etc/default/docker | |
root@node2 $ service docker restart |
Haha, I have found the reason, it's caused by docker, I used the latest docker 1.13.1.
It specifies config in /etc/docker/daemon.json
like this:
{
"bip": "10.15.208.0/20",
"mtu": 1500
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I followed your post Kubernetes From Scratch and came here, I met an issue that my pods still got the primary duplicated IPs after executing all the command above:
And here is the log of flannel:
I used centos7 so I changed
mk-docker-opts.sh -d /etc/default/docker
to my default path/ets/sysconfig/docker
.In fact I didn't understand this two command:
etcdctl -C ...
andflanneld ..
.What's the probable cause this issue?