You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/nodes-scheduler-taints-tolerations-about.adoc
+36-60Lines changed: 36 additions & 60 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,31 +16,23 @@ You apply taints to a node through the `Node` specification (`NodeSpec`) and app
16
16
[source,yaml]
17
17
----
18
18
spec:
19
-
....
20
-
template:
21
-
....
22
-
spec:
23
-
taints:
24
-
- effect: NoExecute
25
-
key: key1
26
-
value: value1
19
+
taints:
20
+
- effect: NoExecute
21
+
key: key1
22
+
value: value1
27
23
....
28
24
----
29
25
30
26
.Example toleration in a `Pod` spec
31
27
[source,yaml]
32
28
----
33
29
spec:
34
-
....
35
-
template:
36
-
....
37
-
spec:
38
-
tolerations:
39
-
- key: "key1"
40
-
operator: "Equal"
41
-
value: "value1"
42
-
effect: "NoExecute"
43
-
tolerationSeconds: 3600
30
+
tolerations:
31
+
- key: "key1"
32
+
operator: "Equal"
33
+
value: "value1"
34
+
effect: "NoExecute"
35
+
tolerationSeconds: 3600
44
36
....
45
37
----
46
38
@@ -148,16 +140,12 @@ You can specify how long a pod can remain bound to a node before being evicted b
148
140
[source,yaml]
149
141
----
150
142
spec:
151
-
....
152
-
template:
153
-
....
154
-
spec:
155
-
tolerations:
156
-
- key: "key1"
157
-
operator: "Equal"
158
-
value: "value1"
159
-
effect: "NoExecute"
160
-
tolerationSeconds: 3600
143
+
tolerations:
144
+
- key: "key1"
145
+
operator: "Equal"
146
+
value: "value1"
147
+
effect: "NoExecute"
148
+
tolerationSeconds: 3600
161
149
----
162
150
163
151
Here, if this pod is running but does not have a matching toleration, the pod stays bound to the node for 3,600 seconds and then be evicted. If the taint is removed before that time, the pod is not evicted.
In this case, the pod cannot be scheduled onto the node, because there is no toleration matching the third taint. The pod continues running if it is already running on the node when the taint is added, because the third taint is the only
@@ -269,19 +253,15 @@ For more information, see link:https://kubernetes.io/docs/concepts/architecture/
269
253
[source,yaml]
270
254
----
271
255
spec:
272
-
....
273
-
template:
274
-
....
275
-
spec:
276
-
tolerations:
277
-
- key: node.kubernetes.io/not-ready
278
-
operator: Exists
279
-
effect: NoExecute
280
-
tolerationSeconds: 300 <1>
281
-
- key: node.kubernetes.io/unreachable
282
-
operator: Exists
283
-
effect: NoExecute
284
-
tolerationSeconds: 300
256
+
tolerations:
257
+
- key: node.kubernetes.io/not-ready
258
+
operator: Exists
259
+
effect: NoExecute
260
+
tolerationSeconds: 300 <1>
261
+
- key: node.kubernetes.io/unreachable
262
+
operator: Exists
263
+
effect: NoExecute
264
+
tolerationSeconds: 300
285
265
----
286
266
287
267
<1> These tolerations ensure that the default pod behavior is to remain bound for five minutes after one of these node conditions problems is detected.
@@ -305,10 +285,6 @@ Pods with this toleration are not removed from a node that has taints.
0 commit comments