flannel config update

pull/133/head
zeming wang 2018-02-07 15:42:36 +08:00
parent 3e91013f26
commit 272ecbbbac
4 changed files with 9 additions and 5 deletions

BIN
.DS_Store vendored 100644

Binary file not shown.

View File

@ -24,8 +24,8 @@ Type=notify
EnvironmentFile=/etc/sysconfig/flanneld EnvironmentFile=/etc/sysconfig/flanneld
EnvironmentFile=-/etc/sysconfig/docker-network EnvironmentFile=-/etc/sysconfig/docker-network
ExecStart=/usr/bin/flanneld-start \ ExecStart=/usr/bin/flanneld-start \
-etcd-endpoints=${ETCD_ENDPOINTS} \ -etcd-endpoints=${FLANNEL_ETCD_ENDPOINTS} \
-etcd-prefix=${ETCD_PREFIX} \ -etcd-prefix=${FLANNEL_ETCD_PREFIX} \
$FLANNEL_OPTIONS $FLANNEL_OPTIONS
ExecStartPost=/usr/libexec/flannel/mk-docker-opts.sh -k DOCKER_NETWORK_OPTIONS -d /run/flannel/docker ExecStartPost=/usr/libexec/flannel/mk-docker-opts.sh -k DOCKER_NETWORK_OPTIONS -d /run/flannel/docker
Restart=on-failure Restart=on-failure
@ -41,11 +41,11 @@ RequiredBy=docker.service
# Flanneld configuration options # Flanneld configuration options
# etcd url location. Point this to the server where etcd runs # etcd url location. Point this to the server where etcd runs
ETCD_ENDPOINTS="https://172.20.0.113:2379,https://172.20.0.114:2379,https://172.20.0.115:2379" FLANNEL_ETCD_ENDPOINTS="https://172.20.0.113:2379,https://172.20.0.114:2379,https://172.20.0.115:2379"
# etcd config key. This is the configuration key that flannel queries # etcd config key. This is the configuration key that flannel queries
# For address range assignment # For address range assignment
ETCD_PREFIX="/kube-centos/network" FLANNEL_ETCD_PREFIX="/kube-centos/network"
# Any additional options that you want to pass # Any additional options that you want to pass
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"

View File

@ -296,6 +296,7 @@ KUBE_SCHEDULER_ARGS="--leader-elect=true --address=127.0.0.1"
systemctl daemon-reload systemctl daemon-reload
systemctl enable kube-scheduler systemctl enable kube-scheduler
systemctl start kube-scheduler systemctl start kube-scheduler
systemctl status kube-scheduler
``` ```
## 验证 master 节点功能 ## 验证 master 节点功能

View File

@ -10,7 +10,10 @@ Before=docker.service
Type=notify Type=notify
EnvironmentFile=/etc/sysconfig/flanneld EnvironmentFile=/etc/sysconfig/flanneld
EnvironmentFile=-/etc/sysconfig/docker-network EnvironmentFile=-/etc/sysconfig/docker-network
ExecStart=/usr/bin/flanneld-start $FLANNEL_OPTIONS ExecStart=/usr/bin/flanneld-start \
-etcd-endpoints=${FLANNEL_ETCD_ENDPOINTS} \
-etcd-prefix=${FLANNEL_ETCD_PREFIX} \
$FLANNEL_OPTIONS
ExecStartPost=/usr/libexec/flannel/mk-docker-opts.sh -k DOCKER_NETWORK_OPTIONS -d /run/flannel/docker ExecStartPost=/usr/libexec/flannel/mk-docker-opts.sh -k DOCKER_NETWORK_OPTIONS -d /run/flannel/docker
Restart=on-failure Restart=on-failure