flannel first-glance

查看ip是否是master的ip:

cat /etc/sysconfig/flanneld

FLANNEL_ETCD= "http://100.10.69.254:2379"

创建脚本:

touch /etc/init.d/start_flannel.sh

vi /etc/init.d/start_flannel.sh

脚本内容:

#!/bin/bash

systemctl stop firewalld

systemctl disable firewalld

systemctl start docker

systemctl stop docker

systemctl restart flanneld

/usr/libexec/flannel/mk-docker-opts.sh -i

source /run/flannel/subnet.env

ifconfig docker0 ${FLANNEL_SUBNET}

systemctl restart docker kubelet kube-proxy

执行脚本:

sh /etc/init.d/start_flannel.sh



参考:

http://blog.csdn.net/carter115/article/details/50986701

http://studygolang.com/articles/9294

你可能感兴趣的:(flannel first-glance)