5050    -  [ Unit tests] ( #unit-tests ) 
5151    -  [ e2e tests] ( #e2e-tests ) 
5252  -  [ Graduation Criteria] ( #graduation-criteria ) 
53-     -  [ Phase 1: Alpha (target 1.31 )] ( #phase-1-alpha-target-131  ) 
54-     -  [ Phase 2:  Beta (target 1.32 )] ( #phase-2--beta-target-132  ) 
53+     -  [ Phase 1: Alpha (target 1.32 )] ( #phase-1-alpha-target-132  ) 
54+     -  [ Phase 2:  Beta (target 1.33 )] ( #phase-2--beta-target-133  ) 
5555    -  [ GA (stable)] ( #ga-stable ) 
5656  -  [ Upgrade / Downgrade Strategy] ( #upgrade--downgrade-strategy ) 
5757      -  [ Upgrade] ( #upgrade ) 
@@ -108,16 +108,18 @@ aggregate of the requested resources by all containers in a pod to find a
108108suitable node for scheduling the pod. The kubelet then enforces these resource
109109constraints by translating the requests and limits into corresponding cgroup
110110settings both for containers and for the pod (where pod level values are
111- aggregates of container level values). The existing Pod API lacks the ability to
112- set resource constraints at pod level, limiting the flexibility and ease of
113- resource management for pods as a whole. This limitation is particularly
114- problematic when users want to focus on  controlling the overall resource
115- consumption of a pod without the need to meticulously configure resource
116- specifications for each individual container in it.
111+ aggregates of container level values derived using the formula in
112+ [ KEP #753 ] ( https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/753-sidecar-containers/README.md#resources-calculation-for-scheduling-and-pod-admission ) ).
113+ The existing Pod API lacks the ability to set resource constraints at pod level,
114+ limiting the flexibility and ease of resource management for pods as a whole.
115+ This limitation is particularly problematic when users want to focus on
116+ controlling the overall resource consumption of a pod without the need to
117+ meticulously configure resource specifications for each individual container in
118+ it.
117119
118120To address this, this KEP proposes extending the Pod API to support Pod-level
119- resource limits and requests for non-extended resources (CPU and  Memory), in 
120- addition to the existing container-level settings.
121+ resource limits and requests for non-extended resources (CPU,  Memory and 
122+ Hugepages), in  addition to the existing container-level settings.
121123
122124## Motivation  
123125
@@ -127,7 +129,7 @@ container, it can be challenging to accurately estimate and allocate resources
127129for individual containers, especially for workloads with unpredictable or bursty
128130resource demands. This often leads to over-allocation of resources to ensure that
129131no container experiences resource starvation, as kubernetes currently lacks a
130- mechanism for sharing resources between containers easily.  
132+ mechanism for sharing resources between containers within a pod  easily.
131133
132134Introducing pod-level resource requests and limits offers a more simplified
133135resource management for multi-container pods as it is easier to gauge the
@@ -161,7 +163,7 @@ This proposal aims to:
161163   the pod level in this phase. However, it could be considered in future extensions of
162164   the KEP.
1631652 .  Pod-level device plugins: existing container-level device plugins are
164-    compatible with this proposal, but there are some discussion  on how to share
166+    compatible with this proposal, but there are some discussions  on how to share
165167   device(s) among containers within a pod, which is out of scope of this KEP.
1661683 .  This proposal will not explore dynamic QoS class adjustments based on runtime
167169   conditions or pod phases. Instead, it will focus on static QoS class
@@ -178,7 +180,6 @@ This proposal aims to:
178180   utilization, specific optimizations for particular workloads, such as
179181   high-performance computing, will be considered in future iterations.
180182
181- 
182183## Proposal  
183184
184185### User Stories  
@@ -274,20 +275,29 @@ other containers within the pod. This approach not only improves overall resourc
274275utilization but can also lead to cost savings in cloud environments where 
275276resource allocation impacts billing. 
276277
278+ Note: Understanding the distinction between resource sharing with pod-level 
279+ resources feature and with burstable pods is important. While both allow 
280+ containers to share resources with other containers, they both operate at 
281+ different scopes. Pod-level resources enable containers within a pod to share 
282+ unused resoures amongst themselves, promoting efficient utilization within the 
283+ pod. In contrast, burstable pods allows sharing of spare resources between 
284+ containers in any pods on the node. This means a container in a burstable pod 
285+ can use resources available elsewhere on the node. 
286+ 
277287### Notes/Constraints/Caveats 
278288
2792891. cgroupv1 has been moved to maintenance mode since Kubernetes version 1.31. 
280290   Hence this feature will be supported only on cgroupv2. Kubelet will fail to 
281291   admit pods with pod-level resources on nodes with cgroupv1. 
282292
2832932. Pod Level Resource Specifications is an **opt-in** feature, and will have no 
284- effect on existing deployments. Only deployments that explicitly require this 
285- functionality should turn it on by setting the relevant resource section at 
286- pod-level in the Pod specification. 
294+     effect on existing deployments. Only deployments that explicitly require this
295+     functionality should turn it on by setting the relevant resource section at
296+     pod-level in the Pod specification.
287297
2882983. In alpha stage of Pod-level Resources feature, when using pod-level resources, 
289-    in-place pod resizing is unsupported with in-place pod resizing. **Users should  
290-    not  use in-place pod resize with pod-level resources enabled.** 
299+    in-place pod resizing is unsupported with in-place pod resizing. **Users won't  
300+    be able to  use in-place pod resize with pod-level resources enabled.** 
291301
292302### Risks and Mitigations 
293303
@@ -393,6 +403,9 @@ type PodSpec struct {
393403To ensure clarity and prevent ambiguity in resource allocation, the following 
394404validation rules are proposed for pod-level resource specifications: 
395405
406+ * In alpha, invalidate requests to update resources at container-level if 
407+   `resources` is set in PodSpec. 
408+ 
396409* Pod-level Resources Priority: If pod-level requests and limits are explicitly 
397410  set, they take precedence over container-level settings. Defaulting logic is only 
398411  applied when pod-level requests and/or limits are not explicitly specified. 
@@ -1404,18 +1417,18 @@ This feature will touch multiple components. For alpha, unit tests coverage for
14041417
14051418Following scenarios need to be covered: 
14061419
1407- 
1408- 
14091420* Cgroup settings when pod-level resources are set. 
14101421* Validate scheduling and admission. 
14111422* Validate the containers with no limits set are throttled on CPU when CPU usage reaches Pod level CPU limits. 
1412- * Validate the containers with no limits set are OOMKilled when memory usage reaches Pod level memory limits. 
1423+ * Validate the containers with no limits set are OOMKilled when memory usage 
1424+   reaches Pod level memory limits. 
1425+ * Test the correct values in TotalResourcesRequested. 
14131426
14141427
14151428### Graduation Criteria 
14161429
14171430
1418- #### Phase 1: Alpha (target 1.31 ) 
1431+ #### Phase 1: Alpha (target 1.32 ) 
14191432
14201433
14211434* Feature is disabled by default. It is an opt-in feature which can be enabled by enabling the `PodLevelResources` 
@@ -1427,7 +1440,7 @@ feature gate and by setting the new `resources` fields in PodSpec at Pod level.
14271440* Documentation mentioning high level design. 
14281441
14291442
1430- #### Phase 2:  Beta (target 1.32 ) 
1443+ #### Phase 2:  Beta (target 1.33 ) 
14311444
14321445
14331446* User Feedback. 
@@ -1438,7 +1451,7 @@ feature gate and by setting the new `resources` fields in PodSpec at Pod level.
14381451* Documentation update and blog post to announce feature in beta phase. 
14391452* [Tentative] Benchmark tests for resource usage with and without pod level resources for bursty workloads. 
14401453  * Use kube_pod_container_resource_usage metric to check resource utilization. 
1441- 
1454+ * [TBD] In-place pod resize support either as a part of this KEP or a separate KEP/feature. 
14421455
14431456#### GA (stable) 
14441457
@@ -1567,16 +1580,20 @@ To resolve this, users can delete the affected pods and recreate them.
15671580###### What happens if we reenable the feature if it was previously rolled back? 
15681581
15691582If the feature is re-enabled after being previously disabled, any new pods will 
1570- again have access to the pod-level resources feature. Existing pods created while 
1571- the feature was disabled will continue to operate without utilizing pod-level 
1572- resources. 
1573- 
1574- However, existing pods that were created with pod-level resources before the 
1575- feature was disabled will experience mismatched calculations for resource usage 
1576- when the feature is disabled, and these calculations will only align correctly 
1577- once the feature is re-enabled. Additionally, any pods that were admitted before 
1578- the feature was disabled but are recreated or restarted will also have mismatched 
1579- calculations after the feature is re-enabled. 
1583+ again have access to the pod-level resources feature.  
1584+ 
1585+ Pods that were created but not yet started will be treated based on its resource 
1586+ spec (pod-level when feature gate is enabled, and container-level when the gate 
1587+ is disabled). 
1588+ 
1589+ Pods that are already running with resources provisioned will continue running 
1590+ with resources provisioned at the time of execution (whether it was pod-level or 
1591+ container-level resources). 
1592+ 
1593+ However, some components may calculate the resource usage of the pods based on 
1594+ the resource spec (pod-level when feature gate is enabled, and container-level 
1595+ when feature gata is disabled), and that may not necessarily match the actual 
1596+ resources provisioned for the running pod. 
15801597
15811598To ensure consistent and intuitive resource calculations, it is advisable to 
15821599delete all pods when toggling the feature between enabling and disabling. This 
0 commit comments