Skip to content

Commit 03d85fb

Browse files
committed
sync resize-container-resources user-namespaces
1 parent fb69fcd commit 03d85fb

File tree

2 files changed

+26
-9
lines changed

2 files changed

+26
-9
lines changed

content/zh-cn/docs/tasks/configure-pod-container/resize-container-resources.md

+22-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ min-kubernetes-server-version: 1.27
1313

1414
<!-- overview -->
1515

16-
{{< feature-state state="alpha" for_k8s_version="v1.27" >}}
16+
{{< feature-state feature_gate_name="InPlacePodVerticalScaling" >}}
1717

1818
<!--
1919
This page assumes that you are familiar with [Quality of Service](/docs/tasks/configure-pod-container/quality-service-pod/)
@@ -31,6 +31,17 @@ resource usage based on the `limits` specified in the pod's containers.
3131
Kubernetes 节点会基于 Pod 的 `requests` 为 Pod 分配资源,
3232
并基于 Pod 的容器中指定的 `limits` 限制 Pod 的资源使用。
3333

34+
<!--
35+
Changing the resource allocation for a running Pod requires the
36+
`InPlacePodVerticalScaling` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
37+
to be enabled. The alternative is to delete the Pod and let the
38+
[workload controller](/docs/concepts/workloads/controllers/) make a replacement Pod
39+
that has a different resource requirement.
40+
-->
41+
要为正在运行的 Pod 更改资源分配量,需要启用 `InPlacePodVerticalScaling`
42+
[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)
43+
并让[工作负载控制器](/zh-cn/docs/concepts/workloads/controllers/)创建一个具有不同资源需求的新 Pod。
44+
3445
<!--
3546
For in-place resize of pod resources:
3647
- Container's resource `requests` and `limits` are _mutable_ for CPU
@@ -73,6 +84,13 @@ For in-place resize of pod resources:
7384

7485
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
7586

87+
<!--
88+
The `InPlacePodVerticalScaling` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) must be enabled
89+
for your control plane and for all nodes in your cluster.
90+
-->
91+
你必须在控制平面和集群中的所有节点上启用 `InPlacePodVerticalScaling`
92+
[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)
93+
7694
<!--
7795
## Container Resize Policies
7896
@@ -241,13 +259,13 @@ spec:
241259
<!--
242260
## Updating the pod's resources
243261

244-
Let's say the CPU requirements have increased, and 0.8 CPU is now desired. This
245-
is typically determined, and may be programmatically applied, by an entity such as
262+
Let's say the CPU requirements have increased, and 0.8 CPU is now desired. This may
263+
be specified manually, or determined and programmatically applied by an entity such as
246264
[VerticalPodAutoscaler](https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler#readme) (VPA).
247265
-->
248266
## 更新 Pod 的资源 {#updating-pod-resources}
249267

250-
假设要求的 CPU 需求已上升,现在需要 0.8 CPU。这通常由
268+
假设要求的 CPU 需求已上升,现在需要 0.8 CPU。这可以手动指定,或由如
251269
[VerticalPodAutoscaler](https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler#readme) (VPA)
252270
这样的实体确定并可能以编程方式应用。
253271

content/zh-cn/docs/tasks/configure-pod-container/user-namespaces.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,13 @@ min-kubernetes-server-version: v1.25
1515
-->
1616

1717
<!-- overview -->
18-
{{< feature-state for_k8s_version="v1.25" state="beta" >}}
18+
{{< feature-state feature_gate_name="UserNamespacesSupport" >}}
1919

2020
<!--
21-
This page shows how to configure a user namespace for stateless pods. This
22-
allows to isolate the user running inside the container from the one in the
23-
host.
21+
This page shows how to configure a user namespace for pods. This allows you to
22+
isolate the user running inside the container from the one in the host.
2423
-->
25-
本页展示如何为无状态 Pod 配置 user 名字空间。可以将容器内的用户与主机上的用户隔离开来。
24+
本页展示如何为 Pod 配置 user 名字空间。可以将容器内的用户与主机上的用户隔离开来。
2625

2726
<!--
2827
A process running as root in a container can run as a different (non-root) user

0 commit comments

Comments
 (0)