Skip to content
This repository was archived by the owner on Oct 31, 2019. It is now read-only.

Commit 0293c9b

Browse files
authored
Merge pull request #30 from jan-g/issue_26_b
Correct flanneld settings
2 parents 309e62a + 8f40c1e commit 0293c9b

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

instances/k8smaster/scripts/flannel.service

+2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ Documentation=https://github.com/coreos/flannel
55
[Service]
66
Type=notify
77
ExecStart=/usr/local/bin/flanneld \
8+
-ip-masq=true \
89
-iface $IP_LOCAL \
910
-etcd-endpoints $ETCD_SERVER \
1011
-etcd-prefix /flannel/network
1112
Restart=always
1213
RestartSec=10
14+
After=docker.service kubelet.service
1315

1416
[Install]
1517
WantedBy=multi-user.target

instances/k8smaster/scripts/setup.template.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ systemctl start kubelet
114114

115115
until kubectl get all; do sleep 1 && echo -n "."; done
116116

117+
systemctl restart flannel
118+
117119
## Wait for k8s master to be available. There is a possible race on pod networks otherwise.
118120
until [ "$(curl localhost:8080/healthz 2>/dev/null)" == "ok" ]; do
119121
sleep 3
@@ -125,4 +127,4 @@ kubectl create -f /root/services/kube-dns.yaml
125127
## install kubernetes-dashboard
126128
kubectl create -f /root/services/kubernetes-dashboard.yaml
127129

128-
echo "Finished running setup.sh"
130+
echo "Finished running setup.sh"

instances/k8sworker/scripts/flannel.service

+2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ Documentation=https://github.com/coreos/flannel
55
[Service]
66
Type=notify
77
ExecStart=/usr/local/bin/flanneld \
8+
-ip-masq=true \
89
-iface $IP_LOCAL \
910
-etcd-endpoints $ETCD_SERVER \
1011
-etcd-prefix /flannel/network
1112
Restart=always
1213
RestartSec=10
14+
After=docker.service kubelet.service
1315

1416
[Install]
1517
WantedBy=multi-user.target

instances/k8sworker/scripts/setup.template.sh

+2
Original file line numberDiff line numberDiff line change
@@ -151,5 +151,7 @@ systemctl daemon-reload
151151
systemctl enable kubelet
152152
systemctl start kubelet
153153

154+
systemctl restart flannel
155+
154156
######################################
155157
echo "Finished running setup.sh"

0 commit comments

Comments
 (0)