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/k8s-best-practices-requests-limits.adoc
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ Memory Limits Cause OOMKills
24
24
* Difficult to predict worst-case memory usage for infrastructure components.
25
25
* Can result in crash loops, degraded service, and unrecoverable clusters.
26
26
27
-
Why Limits are a Problem for Cluster Components
27
+
*Why Limits are a Problem for Cluster Components*
28
28
29
29
Unlike with user workloads, setting resource limits for cluster components presents several challenges and is strongly discouraged:
30
30
@@ -36,14 +36,14 @@ Therefore, *cluster components SHOULD NOT be configured with resource limits*.
36
36
37
37
However, *cluster components MUST declare resource requests for both CPU and memory*.
38
38
39
-
==== Benefits of Using Requests Without Limits
39
+
*Benefits of Using Requests Without Limits*
40
40
41
41
* *Guaranteed Minimums and Bursting*: Specifying requests without limits ensures components receive their required minimum resources and can burst when needed.
42
42
* *Balancing Efficiency and Performance*: When setting resource requests:
43
43
** If too low, the component may be starved under load, leading to degraded performance and service.
44
44
** If too high, the scheduler may be unable to place the component, leading to crash loops or failed deployments. Excessively high requests can also starve user workloads, particularly in small or single-node clusters.
45
45
46
-
== Resource Requests: Compressible vs Incompressible
46
+
*Resource Requests: Compressible vs Incompressible*
47
47
48
48
Kubernetes treats resources differently depending on their behavior under pressure:
49
49
@@ -54,14 +54,14 @@ Kubernetes treats resources differently depending on their behavior under pressu
54
54
|Incompressible |Fails without required amount |Memory, storage
55
55
|===
56
56
57
-
=== Requesting Resources
57
+
*Requesting Resources*
58
58
59
59
* *Compressible (e.g., CPU)*: Requests should be balanced to ensure proportional system behavior and fairness.
60
60
* *Incompressible (e.g., memory)*: Requests should reflect minimum safe usage to avoid runtime failure.
61
61
62
62
See: link:https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-units-in-kubernetes[More details on setting requests for different resource types]
63
63
64
-
== Alternatives to Resource Limits
64
+
*Alternatives to Resource Limits*
65
65
66
66
Although limits are generally avoided for cluster components, the following mechanisms can help manage resources and prioritize workloads:
0 commit comments