Skip to content
This repository was archived by the owner on Jul 30, 2021. It is now read-only.

Commit 357e99e

Browse files
committed
*: add taint to master nodes and tolerations to etcd pods
1 parent 523e740 commit 357e99e

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

hack/multi-node/user-data.sample

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ coreos:
3232
--allow-privileged \
3333
--hostname-override=${COREOS_PUBLIC_IPV4} \
3434
--node-labels=node-role.kubernetes.io/master \
35+
--register-with-taints=node-role.kubernetes.io/master=:NoSchedule \
3536
--cluster_dns=10.3.0.10 \
3637
--cluster_domain=cluster.local
3738

hack/quickstart/kubelet.master

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ ExecStart=/usr/lib/coreos/kubelet-wrapper \
2424
--allow-privileged \
2525
--hostname-override=${COREOS_PRIVATE_IPV4} \
2626
--node-labels=node-role.kubernetes.io/master \
27+
--register-with-taints=node-role.kubernetes.io/master=:NoSchedule \
2728
--cluster_dns=10.3.0.10 \
2829
--cluster_domain=cluster.local \
2930
--pod-manifest-path=/etc/kubernetes/manifests

pkg/util/etcdutil/migrate.go

+8-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,14 @@ func createMigratedEtcdCluster(restclient restclient.Interface, podIP string) er
130130
"pod": {
131131
"nodeSelector": {
132132
"node-role.kubernetes.io/master": ""
133-
}
133+
},
134+
"tolerations": [
135+
{
136+
"key": "node-role.kubernetes.io/master",
137+
"operator": "Exists",
138+
"effect": "NoSchedule"
139+
}
140+
]
134141
},
135142
"selfHosted": {
136143
"bootMemberClientEndpoint": "http://%s:12379"

0 commit comments

Comments
 (0)