@@ -31,11 +31,25 @@ before it terminates end-user pods. For example, it removes unused container
31
31
images when disk resources are starved.
32
32
33
33
If the pods are managed by a {{< glossary_tooltip text="workload" term_id="workload" >}}
34
- resource (such as {{< glossary_tooltip text="StatefulSet" term_id="statefulset" >}}
34
+ management object (such as {{< glossary_tooltip text="StatefulSet" term_id="statefulset" >}}
35
35
or {{< glossary_tooltip text="Deployment" term_id="deployment" >}}) that
36
- replaces failed pods, the control plane or ` kube-controller-manager ` creates new
36
+ replaces failed pods, the control plane ( ` kube-controller-manager ` ) creates new
37
37
pods in place of the evicted pods.
38
38
39
+ ### Self healing for static pods
40
+
41
+ If you are running a [ static pod] ( /docs/concepts/workloads/pods/#static-pods )
42
+ on a node that is under resource pressure, the kubelet may evict that static
43
+ Pod. The kubelet then tries to create a replacement, because static Pods always
44
+ represent an intent to run a Pod on that node.
45
+
46
+ The kubelet takes the _ priority_ of the static pod into account when creating
47
+ a replacement. If the static pod manifest specifies a low priority, and there
48
+ are higher-priority Pods defined within the cluster's control plane, and the
49
+ node is under resource pressure, the kubelet may not be able to make room for
50
+ that static pod. The kubelet continues to attempt to run all static pods even
51
+ when there is resource pressure on a node.
52
+
39
53
## Eviction signals and thresholds
40
54
41
55
The kubelet uses various parameters to make eviction decisions, like the following:
@@ -256,6 +270,11 @@ then the kubelet must choose to evict one of these pods to preserve node stabili
256
270
and to limit the impact of resource starvation on other pods. In this case, it
257
271
will choose to evict pods of lowest Priority first.
258
272
273
+ If you are running a [ static pod] ( /docs/concepts/workloads/pods/#static-pods )
274
+ and want to avoid having it evicted under resource pressure, set the
275
+ ` priority ` field for that Pod directly. Static pods do not support the
276
+ ` priorityClassName ` field.
277
+
259
278
When the kubelet evicts pods in response to inode or process ID starvation, it uses
260
279
the Pods' relative priority to determine the eviction order, because inodes and PIDs have no
261
280
requests.
0 commit comments