Merge pull request #89 from duffqiu/patch-2

增加flannel设置网卡的参数
pull/93/head
Jimmy Song 2017-12-23 22:23:26 +08:00 committed by GitHub
commit e52bc0c519
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -51,6 +51,8 @@ ETCD_PREFIX="/kube-centos/network"
FLANNEL_OPTIONS="-etcd-cafile=/etc/kubernetes/ssl/ca.pem -etcd-certfile=/etc/kubernetes/ssl/kubernetes.pem -etcd-keyfile=/etc/kubernetes/ssl/kubernetes-key.pem" FLANNEL_OPTIONS="-etcd-cafile=/etc/kubernetes/ssl/ca.pem -etcd-certfile=/etc/kubernetes/ssl/kubernetes.pem -etcd-keyfile=/etc/kubernetes/ssl/kubernetes-key.pem"
``` ```
如果是多网卡例如vagrant环境则需要在FLANNEL_OPTIONS中增加指定的外网出口的网卡例如-iface=eth2
**在etcd中创建网络配置** **在etcd中创建网络配置**
执行下面的命令为docker分配IP地址段。 执行下面的命令为docker分配IP地址段。
@ -106,4 +108,4 @@ $etcdctl get /kube-centos/network/subnets/172.30.46.0-24
{"PublicIP":"172.20.0.113","BackendType":"vxlan","BackendData":{"VtepMAC":"e6:b2:fd:f6:66:96"}} {"PublicIP":"172.20.0.113","BackendType":"vxlan","BackendData":{"VtepMAC":"e6:b2:fd:f6:66:96"}}
``` ```
如果可以查看到以上内容证明flannel已经安装完成下一步是在node节点上安装和配置docker、kubelet、kube-proxy等请参考下一节[部署node节点](node-installation.md)。 如果可以查看到以上内容证明flannel已经安装完成下一步是在node节点上安装和配置docker、kubelet、kube-proxy等请参考下一节[部署node节点](node-installation.md)。