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
|`MemoryPressure`|`memory.available`| Available memory on the node has satisfied an eviction threshold |
196
-
|`DiskPressure`|`nodefs.available`, `nodefs.inodesFree`, `imagefs.available`, or `imagefs.inodesFree`| Available disk space and inodes on either the node's root filesystemor image filesystem has satisfied an eviction threshold |
197
-
|`PIDPressure`|`pid.available`| Available processes identifiers on the (Linux) node has fallen below an eviction threshold |
246
+
| Node Condition | Eviction Signal | Description |
|`MemoryPressure`|`memory.available`| Available memory on the node has satisfied an eviction threshold |
249
+
|`DiskPressure`|`nodefs.available`, `nodefs.inodesFree`, `imagefs.available`, `imagefs.inodesFree`, `containerfs.available`, or `containerfs.inodesFree`| Available disk space and inodes on either the node's root filesystem, image filesystem, or container filesystem has satisfied an eviction threshold|
250
+
|`PIDPressure`|`pid.available`| Available processes identifiers on the (Linux) node has fallen below an eviction threshold |
198
251
199
252
The control plane also [maps](/docs/concepts/scheduling-eviction/taint-and-toleration/#taint-nodes-by-condition)
200
253
these node conditions to taints.
@@ -219,23 +272,36 @@ The kubelet tries to reclaim node-level resources before it evicts end-user pods
219
272
When a `DiskPressure` node condition is reported, the kubelet reclaims node-level
220
273
resources based on the filesystems on the node.
221
274
275
+
#### Without `imagefs` or `containerfs`
276
+
277
+
If the node only has a `nodefs` filesystem that meets eviction thresholds,
278
+
the kubelet frees up disk space in the following order:
279
+
280
+
1. Garbage collect dead pods and containers.
281
+
1. Delete unused images.
282
+
222
283
#### With `imagefs`
223
284
224
285
If the node has a dedicated `imagefs` filesystem for container runtimes to use,
225
286
the kubelet does the following:
226
287
227
-
- If the `nodefs` filesystem meets the eviction thresholds, the kubelet garbage collects
228
-
dead pods and containers.
288
+
- If the `nodefs` filesystem meets the eviction thresholds, the kubelet garbage
289
+
collects dead pods and containers.
290
+
229
291
- If the `imagefs` filesystem meets the eviction thresholds, the kubelet
230
292
deletes all unused images.
231
293
232
-
#### Without`imagefs`
294
+
#### With`imagefs` and `containerfs`
233
295
234
-
If the node only has a `nodefs` filesystem that meets eviction thresholds,
235
-
the kubelet frees up disk space in the following order:
296
+
If the node has a dedicated `containerfs` alongside the `imagefs` filesystem
297
+
configured for the container runtimes to use, then kubelet will attempt to
298
+
reclaim resources as follows:
299
+
300
+
- If the `containerfs` filesystem meets the eviction thresholds, the kubelet
301
+
garbage collects dead pods and containers.
236
302
237
-
1. Garbage collect dead pods and containers
238
-
1. Delete unused images
303
+
- If the `imagefs` filesystem meets the eviction thresholds, the kubelet
304
+
deletes all unused images.
239
305
240
306
### Pod selection for kubelet eviction
241
307
@@ -253,6 +319,7 @@ As a result, kubelet ranks and evicts pods in the following order:
253
319
1.`BestEffort` or `Burstable` pods where the usage exceeds requests. These pods
254
320
are evicted based on their Priority and then by how much their usage level
255
321
exceeds the request.
322
+
256
323
1.`Guaranteed` pods and `Burstable` pods where the usage is less than requests
257
324
are evicted last, based on their Priority.
258
325
@@ -283,23 +350,38 @@ the Pods' relative priority to determine the eviction order, because inodes and
283
350
requests.
284
351
285
352
The kubelet sorts pods differently based on whether the node has a dedicated
286
-
`imagefs` filesystem:
353
+
`imagefs`or `containerfs`filesystem:
287
354
288
-
#### With `imagefs`
355
+
#### Without `imagefs` or `containerfs` (`nodefs` and `imagefs` use the same filesystem) {#without-imagefs}
356
+
357
+
- If `nodefs` triggers evictions, the kubelet sorts pods based on their
358
+
total disk usage (`local volumes + logs and a writable layer of all containers`).
359
+
360
+
#### With `imagefs` (`nodefs` and `imagefs` filesystems are separate) {#with-imagefs}
289
361
290
-
If `nodefs`is triggering evictions, the kubelet sorts pods based on `nodefs`
291
-
usage (`local volumes + logs of all containers`).
362
+
-If `nodefs`triggers evictions, the kubelet sorts pods based on `nodefs`
363
+
usage (`local volumes + logs of all containers`).
292
364
293
-
If `imagefs`is triggering evictions, the kubelet sorts pods based on the
294
-
writable layer usage of all containers.
365
+
-If `imagefs`triggers evictions, the kubelet sorts pods based on the
366
+
writable layer usage of all containers.
295
367
296
-
#### Without `imagefs`
368
+
#### With `imagesfs` and `containerfs` (`imagefs` and `containerfs` have been split) {#with-containersfs}
297
369
298
-
If `nodefs` is triggering evictions, the kubelet sorts pods based on their total
299
-
disk usage (`local volumes + logs & writable layer of all containers`)
370
+
- If `containerfs` triggers evictions, the kubelet sorts pods based on
371
+
`containerfs` usage (`local volumes + logs and a writable layer of all containers`).
372
+
373
+
- If `imagefs` triggers evictions, the kubelet sorts pods based on the
374
+
`storage of images` rank, which represents the disk usage of a given image.
300
375
301
376
### Minimum eviction reclaim
302
377
378
+
{{<note>}}
379
+
As of Kubernetes v{{< skew currentVersion >}}, you cannot set a custom value
380
+
for the `containerfs.available` metric. The configuration for this specific
381
+
metric will be set automatically to reflect values set for either the `nodefs`
382
+
or `imagefs`, depending on the configuration.
383
+
{{</note>}}
384
+
303
385
In some cases, pod eviction only reclaims a small amount of the starved resource.
304
386
This can lead to the kubelet repeatedly hitting the configured eviction thresholds
305
387
and triggering multiple evictions.
@@ -326,7 +408,8 @@ evictionMinimumReclaim:
326
408
327
409
In this example, if the `nodefs.available` signal meets the eviction threshold,
328
410
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.
411
+
and then continues to reclaim the minimum amount of 500MiB, until the available
412
+
nodefs storage value reaches 1.5GiB.
330
413
331
414
Similarly, the kubelet tries to reclaim the `imagefs` resource until the `imagefs.available`
332
415
value reaches `102Gi`, representing 102 GiB of available container image storage. If the amount
0 commit comments