Merge pull request #46000 from asa3311/sync-zh-115

[zh] sync resize-container-resources user-namespaces
pull/46011/head
Kubernetes Prow Robot 2024-04-25 18:16:34 -07:00 committed by GitHub
commit 774a520282
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 26 additions and 9 deletions

View File

@ -13,7 +13,7 @@ min-kubernetes-server-version: 1.27
<!-- overview -->
{{< feature-state state="alpha" for_k8s_version="v1.27" >}}
{{< feature-state feature_gate_name="InPlacePodVerticalScaling" >}}
<!--
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.
Kubernetes 节点会基于 Pod 的 `requests` 为 Pod 分配资源,
并基于 Pod 的容器中指定的 `limits` 限制 Pod 的资源使用。
<!--
Changing the resource allocation for a running Pod requires the
`InPlacePodVerticalScaling` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
to be enabled. The alternative is to delete the Pod and let the
[workload controller](/docs/concepts/workloads/controllers/) make a replacement Pod
that has a different resource requirement.
-->
要为正在运行的 Pod 更改资源分配量,需要启用 `InPlacePodVerticalScaling`
[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)。
并让[工作负载控制器](/zh-cn/docs/concepts/workloads/controllers/)创建一个具有不同资源需求的新 Pod。
<!--
For in-place resize of pod resources:
- Container's resource `requests` and `limits` are _mutable_ for CPU
@ -73,6 +84,13 @@ For in-place resize of pod resources:
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
<!--
The `InPlacePodVerticalScaling` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) must be enabled
for your control plane and for all nodes in your cluster.
-->
你必须在控制平面和集群中的所有节点上启用 `InPlacePodVerticalScaling`
[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)。
<!--
## Container Resize Policies
@ -241,13 +259,13 @@ spec:
<!--
## Updating the pod's resources
Let's say the CPU requirements have increased, and 0.8 CPU is now desired. This
is typically determined, and may be programmatically applied, by an entity such as
Let's say the CPU requirements have increased, and 0.8 CPU is now desired. This may
be specified manually, or determined and programmatically applied by an entity such as
[VerticalPodAutoscaler](https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler#readme) (VPA).
-->
## 更新 Pod 的资源 {#updating-pod-resources}
假设要求的 CPU 需求已上升,现在需要 0.8 CPU。这通常由
假设要求的 CPU 需求已上升,现在需要 0.8 CPU。这可以手动指定,或由如
[VerticalPodAutoscaler](https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler#readme) (VPA)
这样的实体确定并可能以编程方式应用。

View File

@ -15,14 +15,13 @@ min-kubernetes-server-version: v1.25
-->
<!-- overview -->
{{< feature-state for_k8s_version="v1.25" state="beta" >}}
{{< feature-state feature_gate_name="UserNamespacesSupport" >}}
<!--
This page shows how to configure a user namespace for stateless pods. This
allows to isolate the user running inside the container from the one in the
host.
This page shows how to configure a user namespace for pods. This allows you to
isolate the user running inside the container from the one in the host.
-->
本页展示如何为无状态 Pod 配置 user 名字空间。可以将容器内的用户与主机上的用户隔离开来。
本页展示如何为 Pod 配置 user 名字空间。可以将容器内的用户与主机上的用户隔离开来。
<!--
A process running as root in a container can run as a different (non-root) user