标签:env master 2.3 int emctl etcd point flannel 启动
1.
etcdctl --ca-file=/etc/etcd/ssl/ca.pem --cert-file=/etc/etcd/ssl/server.pem --key-file=/etc/etcd/ssl/server-key.pem --endpoints="https://172.18.6.39:2379,https://172.18.6.40:2379,https://172.18.6.41:2379" set /coreos.com/network/config ‘{ "Network": "172.31.0.0/16", "Backend": {"Type": "vxlan"}}‘
2.生成flannel启动文件
cat > /usr/lib/systemd/system/flanneld.service <<EOF [Unit] Description=Flanneld overlay address etcd agent After=network-online.target network.target Before=docker.service [Service] Type=notify EnvironmentFile=/etc/kubernetes/flanneld ExecStart=/usr/bin/flanneld --ip-masq \$FLANNEL_OPTIONS ExecStartPost=/usr/bin/mk-docker-opts.sh -k DOCKER_NETWORK_OPTIONS -d /run/flannel/subnet.env Restart=on-failure [Install] WantedBy=multi-user.target EOF
3.生成flannel配置文件
cat >/etc/kubernetes/flanneld<<EOF FLANNEL_OPTIONS="--etcd-endpoints=https://172.18.6.39:2379,https://172.18.6.40:2379,https://172.18.6.41:2379 -etcd-cafile=/etc/etcd/ssl/ca.pem -etcd-certfile=/etc/etcd/ssl/server.pem -etcd-keyfile=/etc/etcd/ssl/server-key.pem" EOF
4.启动flannel
5.修改docker配置文件
(1)修改启动文件
vim /usr/lib/systemd/system/docker.service #Add envionment# EnvironmentFile=/run/flannel/subnet.env #添加 ExecStart=/usr/bin/dockerd --graph=/opt/docker $DOCKER_NETWORK_OPTIONS #修改
(2)修改配置文件
cd /etc/docker/ cp daemon.json daemon.json_bak
systemctl daemon-reload
systemctl restart docker
Kubernetes_V1.10集群部署-master-部署flanne网络
标签:env master 2.3 int emctl etcd point flannel 启动
原文地址:https://www.cnblogs.com/dingkailinux/p/9268436.html