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
A soft eviction threshold pairs an eviction threshold with a required
121
138
administrator-specified grace period. The kubelet does not evict pods until the
122
-
grace period is exceeded. The kubelet returns an error on startup if there is no
123
-
specified grace period.
139
+
grace period is exceeded. The kubelet returns an error on startup if you do
140
+
not specify a grace period.
124
141
125
142
You can specify both a soft eviction threshold grace period and a maximum
126
143
allowed pod termination grace period for kubelet to use during evictions. If you
@@ -160,16 +177,16 @@ then the values of other parameters will not be inherited as the default
160
177
values and will be set to zero. In order to provide custom values, you
161
178
should provide all the thresholds respectively.
162
179
163
-
###Eviction monitoring interval
180
+
## Eviction monitoring interval
164
181
165
-
The kubelet evaluates eviction thresholds based on its configured `housekeeping-interval`
182
+
The kubelet evaluates eviction thresholds based on its configured `housekeeping-interval`,
166
183
which defaults to `10s`.
167
184
168
-
###Node conditions {#node-conditions}
185
+
## Node conditions {#node-conditions}
169
186
170
-
The kubelet reports node conditions to reflect that the node is under pressure
171
-
because hard or soft eviction threshold is met, independent of configured grace
172
-
periods.
187
+
The kubelet reports [node conditions](/docs/concepts/architecture/nodes/#condition)
188
+
to reflect that the node is under pressure because hard or soft eviction
189
+
threshold is met, independent of configured grace periods.
173
190
174
191
The kubelet maps eviction signals to node conditions as follows:
175
192
@@ -179,10 +196,13 @@ The kubelet maps eviction signals to node conditions as follows:
179
196
|`DiskPressure`|`nodefs.available`, `nodefs.inodesFree`, `imagefs.available`, or `imagefs.inodesFree`| Available disk space and inodes on either the node's root filesystem or image filesystem has satisfied an eviction threshold |
180
197
|`PIDPressure`|`pid.available`| Available processes identifiers on the (Linux) node has fallen below an eviction threshold |
181
198
199
+
The control plane also [maps](/docs/concepts/scheduling-eviction/taint-and-toleration/#taint-nodes-by-condition)
200
+
these node conditions to taints.
201
+
182
202
The kubelet updates the node conditions based on the configured
183
203
`--node-status-update-frequency`, which defaults to `10s`.
184
204
185
-
####Node condition oscillation
205
+
### Node condition oscillation
186
206
187
207
In some cases, nodes oscillate above and below soft eviction thresholds without
188
208
holding for the defined grace periods. This causes the reported node condition
@@ -237,9 +257,9 @@ As a result, kubelet ranks and evicts pods in the following order:
237
257
are evicted last, based on their Priority.
238
258
239
259
{{<note>}}
240
-
The kubelet does not use the pod's QoS class to determine the eviction order.
260
+
The kubelet does not use the pod's [QoS class](/docs/concepts/workloads/pods/pod-qos/) to determine the eviction order.
241
261
You can use the QoS class to estimate the most likely pod eviction order when
242
-
reclaiming resources like memory. QoS does not apply to EphemeralStorage requests,
262
+
reclaiming resources like memory. QoS classification does not apply to EphemeralStorage requests,
243
263
so the above scenario will not apply if the node is, for example, under `DiskPressure`.
244
264
{{</note>}}
245
265
@@ -253,8 +273,13 @@ then the kubelet must choose to evict one of these pods to preserve node stabili
253
273
and to limit the impact of resource starvation on other pods. In this case, it
254
274
will choose to evict pods of lowest Priority first.
255
275
256
-
When the kubelet evicts pods in response to `inode` or `PID` starvation, it uses
257
-
the Priority to determine the eviction order, because `inodes` and `PIDs` have no
276
+
If you are running a [static pod](/docs/concepts/workloads/pods/#static-pods)
277
+
and want to avoid having it evicted under resource pressure, set the
278
+
`priority` field for that Pod directly. Static pods do not support the
279
+
`priorityClassName` field.
280
+
281
+
When the kubelet evicts pods in response to inode or process ID starvation, it uses
282
+
the Pods' relative priority to determine the eviction order, because inodes and PIDs have no
258
283
requests.
259
284
260
285
The kubelet sorts pods differently based on whether the node has a dedicated
@@ -300,31 +325,31 @@ evictionMinimumReclaim:
300
325
```
301
326
302
327
In this example, if the `nodefs.available` signal meets the eviction threshold,
303
-
the kubelet reclaims the resource until the signal reaches the threshold of `1Gi`,
304
-
and then continues to reclaim the minimum amount of `500Mi` it until the signal
305
-
reaches `1.5Gi`.
328
+
the kubelet reclaims the resource until the signal reaches the threshold of 1GiB,
329
+
and then continues to reclaim the minimum amount of 500MiB, until the available nodefs storage value reaches 1.5GiB.
306
330
307
-
Similarly, the kubelet reclaims the `imagefs` resource until the `imagefs.available`
308
-
signal reaches `102Gi`.
331
+
Similarly, the kubelet tries to reclaim the `imagefs` resource until the `imagefs.available`
332
+
value reaches `102Gi`, representing 102 GiB of available container image storage. If the amount
333
+
of storage that the kubelet could reclaim is less than 2GiB, the kubelet doesn't reclaim anything.
309
334
310
335
The default `eviction-minimum-reclaim` is `0` for all resources.
311
336
312
-
### Node out of memory behavior
337
+
## Node out of memory behavior
313
338
314
-
If the node experiences an out of memory (OOM) event prior to the kubelet
339
+
If the node experiences an _out of memory_ (OOM) event prior to the kubelet
315
340
being able to reclaim memory, the node depends on the [oom_killer](https://lwn.net/Articles/391222/)
316
341
to respond.
317
342
318
343
The kubelet sets an `oom_score_adj` value for each container based on the QoS for the pod.
0 commit comments