From 272ecbbbac43dccc46392ee0f161c5bdba5ab2d9 Mon Sep 17 00:00:00 2001 From: zeming wang Date: Wed, 7 Feb 2018 15:42:36 +0800 Subject: [PATCH] flannel config update --- .DS_Store | Bin 0 -> 6148 bytes practice/flannel-installation.md | 8 ++++---- practice/master-installation.md | 1 + systemd/flanneld.service | 5 ++++- 4 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..499e637103513470c2fe2b76bd245137fb6c4747 GIT binary patch literal 6148 zcmeH~&1%~~5XWZ|H<21cROlgr9u|7&#RmuF<0{u>}dfu<3lwYv@}NSLDkwtiKDBR`W-o{g(+_Xk^9 zZQWa2_k4e&?YB4EZ{nev#g(Wgoo_;(#|MdCG*Ne+&qtfFqRU!3ata@E$72u#{%Yy9HUhX~_ILN45mz2DB@@PMbo&E&y+%DKF&S z!x3-<8bg5g2aZk}S*?xgtpf{v1wf_W2yIxWy9DKMtC7{(D2|{plZt9mnZ05#laBq| z#zj_Zqb41gy?ikHWM*$DOg|mx=Qj#VGlpao~=tCM`tZZe}_&+akWvMf`vVfb%l=NEp%--#;JlDS*?v?51RWC&=_3d J2>eq5zW_t*w)_A9 literal 0 HcmV?d00001 diff --git a/practice/flannel-installation.md b/practice/flannel-installation.md index 89c814c02..e97203e04 100644 --- a/practice/flannel-installation.md +++ b/practice/flannel-installation.md @@ -24,8 +24,8 @@ Type=notify EnvironmentFile=/etc/sysconfig/flanneld EnvironmentFile=-/etc/sysconfig/docker-network ExecStart=/usr/bin/flanneld-start \ - -etcd-endpoints=${ETCD_ENDPOINTS} \ - -etcd-prefix=${ETCD_PREFIX} \ + -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 Restart=on-failure @@ -41,11 +41,11 @@ RequiredBy=docker.service # Flanneld configuration options # 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 # For address range assignment -ETCD_PREFIX="/kube-centos/network" +FLANNEL_ETCD_PREFIX="/kube-centos/network" # 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" diff --git a/practice/master-installation.md b/practice/master-installation.md index 1110186a5..d9bd3de48 100644 --- a/practice/master-installation.md +++ b/practice/master-installation.md @@ -296,6 +296,7 @@ KUBE_SCHEDULER_ARGS="--leader-elect=true --address=127.0.0.1" systemctl daemon-reload systemctl enable kube-scheduler systemctl start kube-scheduler +systemctl status kube-scheduler ``` ## 验证 master 节点功能 diff --git a/systemd/flanneld.service b/systemd/flanneld.service index 968e4ea16..d6ecf1343 100644 --- a/systemd/flanneld.service +++ b/systemd/flanneld.service @@ -10,7 +10,10 @@ Before=docker.service Type=notify EnvironmentFile=/etc/sysconfig/flanneld 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 Restart=on-failure