@@ -211,21 +211,24 @@ resource requests/limits of that type for each container in the Pod.
211
211
{{< feature-state feature_gate_name="PodLevelResources" >}}
212
212
213
213
<!--
214
- Starting in Kubernetes 1.32, you can also specify resource requests and limits at
214
+ Provided your cluster has the `PodLevelResources`
215
+ [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) enabled,
216
+ you can specify resource requests and limits at
215
217
the Pod level. At Pod level, Kubernetes {{< skew currentVersion >}}
216
218
only supports resource requests or limits for specific resource types: `cpu` and /
217
- or `memory`. This feature is currently in alpha and with the feature enabled,
218
- Kubernetes allows you to declare an overall resource budget for the Pod, which is
219
- especially helpful when dealing with a large number of containers where it can be
220
- difficult to accurately gauge individual resource needs. Additionally, it enables
221
- containers within a Pod to share idle resources with each other, improving resource
222
- utilization.
223
- -->
224
- 从 Kubernetes 1.32 开始,你还可以在 Pod 级别指定资源请求和限制。
219
+ or `memory` and / or `hugepages`. With this feature, Kubernetes allows you to declare an overall resource
220
+ budget for the Pod, which is especially helpful when dealing with a large number of
221
+ containers where it can be difficult to accurately gauge individual resource needs.
222
+ Additionally, it enables containers within a Pod to share idle resources with each
223
+ other, improving resource utilization.
224
+ -->
225
+ 如果你的集群启用了 ` PodLevelResources `
226
+ [ 特性门控] ( /zh-cn/docs/reference/command-line-tools-reference/feature-gates/ ) ,
227
+ 你可以在 Pod 级别指定资源请求和限制。
225
228
在 Pod 级别,Kubernetes {{< skew currentVersion >}} 仅支持为特定资源类型设置资源请求或限制:
226
- ` cpu ` 和/或 ` memory ` 。此特性目前处于 Alpha 阶段。在启用该特性后,Kubernetes
227
- 允许你声明 Pod 的总体资源预算,这在处理大量容器时特别有用 ,
228
- 因为在这种情况下准确评估单个容器的资源需求可能会很困难 。
229
+ ` cpu ` 和/或 ` memory ` 和/或 ` hugepages ` 。
230
+ 通过此特性,Kubernetes 允许你为 Pod 申领一个资源总预算 ,
231
+ 这在处理大量容器时特别有用,因为在这种情况下很难准确评估各个容器的资源需求 。
229
232
此外,它还允许 Pod 内的容器之间共享空闲资源,从而提高资源利用率。
230
233
231
234
<!--
@@ -235,8 +238,10 @@ For a Pod, you can specify resource limits and requests for CPU and memory by in
235
238
236
239
* ` spec.resources.limits.cpu `
237
240
* ` spec.resources.limits.memory `
241
+ * ` spec.resources.limits.hugepages-<size> `
238
242
* ` spec.resources.requests.cpu `
239
243
* ` spec.resources.requests.memory `
244
+ * ` spec.resources.requests.hugepages-<size> `
240
245
241
246
<!--
242
247
## Resource units in Kubernetes
@@ -1278,6 +1283,21 @@ extender.
1278
1283
}
1279
1284
` ` `
1280
1285
1286
+ <!--
1287
+ # ### Extended resources allocation by DRA
1288
+
1289
+ Extended resources allocation by DRA allows cluster administrators to specify an `extendedResourceName`
1290
+ in DeviceClass, then the devices matching the DeviceClass can be requested from a pod's extended
1291
+ resource requests. Read more about
1292
+ [Extended Resource allocation by DRA](/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#extended-resource).
1293
+ -->
1294
+ # ### DRA 扩展资源分配
1295
+
1296
+ DRA 扩展资源分配允许集群管理员在 DeviceClass 中指定一个
1297
+ ` extendedResourceName` ,然后与所指定 DeviceClass 匹配的设备可以使用
1298
+ Pod 的扩展资源请求来获取。
1299
+ 进一步阅读关于[使用 DRA 进行扩展资源分配](/zh-cn/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#extended-resource)的内容。
1300
+
1281
1301
<!--
1282
1302
# ## Consuming extended resources
1283
1303
@@ -1606,6 +1626,7 @@ memory limit (and possibly request) for that container.
1606
1626
* Read about [project quotas](https://www.linux.org/docs/man8/xfs_quota.html) in XFS
1607
1627
* Read more about the [kube-scheduler configuration reference (v1)](/docs/reference/config-api/kube-scheduler-config.v1/)
1608
1628
* Read more about [Quality of Service classes for Pods](/docs/concepts/workloads/pods/pod-qos/)
1629
+ * Read more about [Extended Resource allocation by DRA](/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#extended-resource)
1609
1630
-->
1610
1631
* 获取[ 分配内存资源给容器和 Pod] ( /zh-cn/docs/tasks/configure-pod-container/assign-memory-resource/ ) 的实践经验
1611
1632
* 获取[ 分配 CPU 资源给容器和 Pod] ( /zh-cn/docs/tasks/configure-pod-container/assign-cpu-resource/ ) 的实践经验
@@ -1614,3 +1635,4 @@ memory limit (and possibly request) for that container.
1614
1635
* 阅读 XFS 中[ 项目配额] ( https://www.linux.org/docs/man8/xfs_quota.html ) 的文档
1615
1636
* 进一步阅读 [ kube-scheduler 配置参考(v1)] ( /zh-cn/docs/reference/config-api/kube-scheduler-config.v1/ )
1616
1637
* 进一步阅读 [ Pod 的服务质量等级] ( /zh-cn/docs/concepts/workloads/pods/pod-qos/ )
1638
+ * 进一步阅读[ 使用 DRA 进行扩展资源分配] ( /zh-cn/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#extended-resource )
0 commit comments