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-nodes-garbage-collection-configuring.adoc
+10-8Lines changed: 10 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,8 @@ You can configure any combination of the following:
21
21
* Hard eviction for containers
22
22
* Eviction for images
23
23
24
+
Container garbage collection removes terminated containers. Image garbage collection removes images that are not referenced by any running pods.
25
+
24
26
.Prerequisites
25
27
26
28
. Obtain the label associated with the static `MachineConfigPool` CRD for the type of node you want to configure by entering the following command:
@@ -106,15 +108,15 @@ spec:
106
108
----
107
109
<1> Name for the object.
108
110
<2> Specify the label from the machine config pool.
109
-
<3> Type of eviction: `evictionSoft` or `evictionHard`.
110
-
<4> Eviction thresholds based on a specific eviction trigger signal.
111
-
<5> Grace periods for the soft eviction. This parameter does not apply to `eviction-hard`.
112
-
<6> Eviction thresholds based on a specific eviction trigger signal.
111
+
<3> For container garbage collection: Type of eviction: `evictionSoft` or `evictionHard`.
112
+
<4> For container garbage collection: Eviction thresholds based on a specific eviction trigger signal.
113
+
<5> For container garbage collection: Grace periods for the soft eviction. This parameter does not apply to `eviction-hard`.
114
+
<6> For container garbage collection: Eviction thresholds based on a specific eviction trigger signal.
113
115
For `evictionHard` you must specify all of these parameters. If you do not specify all parameters, only the specified parameters are applied and the garbage collection will not function properly.
114
-
<7> The duration to wait before transitioning out of an eviction pressure condition.
115
-
<8> The minimum age for an unused image before the image is removed by garbage collection.
116
-
<9> The percent of disk usage (expressed as an integer) that triggers image garbage collection.
117
-
<10> The percent of disk usage (expressed as an integer) that image garbage collection attempts to free.
116
+
<7> For container garbage collection: The duration to wait before transitioning out of an eviction pressure condition.
117
+
<8> For image garbage collection: The minimum age for an unused image before the image is removed by garbage collection.
118
+
<9> For image garbage collection: The percent of disk usage (expressed as an integer) that triggers image garbage collection.
119
+
<10> For image garbage collection: The percent of disk usage (expressed as an integer) that image garbage collection attempts to free.
= Understanding how terminated containers are removed through garbage collection
10
10
11
-
Container garbage collection can be performed using eviction thresholds.
11
+
Container garbage collection removes terminated containers by using eviction thresholds.
12
12
13
13
When eviction thresholds are set for garbage collection, the node tries to keep any container for any pod accessible from the API. If the pod has been deleted, the containers will be as well. Containers are preserved as long the pod is not deleted and the eviction threshold is not reached. If the node is under disk pressure, it will remove containers and their logs will no longer be accessible using `oc logs`.
0 commit comments