Skip to content

Commit 0f40f8f

Browse files
committed
[zh] sync /workloads/pods/_index.md
1 parent c59e86f commit 0f40f8f

File tree

1 file changed

+42
-14
lines changed
  • content/zh-cn/docs/concepts/workloads/pods

1 file changed

+42
-14
lines changed

content/zh-cn/docs/concepts/workloads/pods/_index.md

Lines changed: 42 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -537,30 +537,58 @@ Pod 中的容器所看到的系统主机名与为 Pod 配置的 `name` 属性值
537537

538538
<!--
539539
## Privileged mode for containers
540+
-->
541+
## 容器的特权模式 {#privileged-mode-for-containers}
542+
543+
{{< note >}}
544+
<!--
545+
Your {{< glossary_tooltip text="container runtime" term_id="container-runtime" >}} must support the concept of a privileged container for this setting to be relevant.
546+
-->
547+
你的{{< glossary_tooltip text="容器运行时" term_id="container-runtime" >}}必须支持特权容器的概念才能使用这一配置。
548+
{{< /note >}}
540549

541-
In Linux, any container in a Pod can enable privileged mode using the `privileged` (Linux) flag on the [security context](/docs/tasks/configure-pod-container/security-context/) of the container spec. This is useful for containers that want to use operating system administrative capabilities such as manipulating the network stack or accessing hardware devices.
550+
<!--
551+
Any container in a pod can run in privileged mode to use operating system administrative capabilities
552+
that would otherwise be inaccessible. This is available for both Windows and Linux.
553+
-->
554+
Pod 中的所有容器都可以在特权模式下运行,以使用原本无法访问的操作系统管理权能。
555+
此模式同时适用于 Windows 和 Linux。
542556

543-
If your cluster has the `WindowsHostProcessContainers` feature enabled, you can create a [Windows HostProcess pod](/docs/tasks/configure-pod-container/create-hostprocess-pod) by setting the `windowsOptions.hostProcess` flag on the security context of the pod spec. All containers in these pods must run as Windows HostProcess containers. HostProcess pods run directly on the host and can also be used to perform administrative tasks as is done with Linux privileged containers.
557+
<!--
558+
### Linux priviledged containers
559+
560+
In Linux, any container in a Pod can enable privileged mode using the `privileged` (Linux) flag
561+
on the [security context](/docs/tasks/configure-pod-container/security-context/) of the
562+
container spec. This is useful for containers that want to use operating system administrative
563+
capabilities such as manipulating the network stack or accessing hardware devices.
544564
-->
545-
## 容器的特权模式 {#privileged-mode-for-containers}
565+
### Linux 特权容器 {#linux-priviledged-containers}
546566

547-
在 Linux 中,Pod 中的任何容器都可以使用容器规约中的
567+
在 Linux 中,Pod 中的所有容器都可以使用容器规约中的
548568
[安全性上下文](/zh-cn/docs/tasks/configure-pod-container/security-context/)中的
549569
`privileged`(Linux)参数启用特权模式。
550-
这对于想要使用操作系统管理权能(Capabilities,如操纵网络堆栈和访问设备)的容器很有用。
570+
这对于想要使用操作系统管理权能(Capabilities,如操纵网络堆栈和访问硬件设备)的容器很有用。
551571

552-
如果你的集群启用了 `WindowsHostProcessContainers` 特性,你可以使用 Pod 规约中安全上下文的
553-
`windowsOptions.hostProcess` 参数来创建
554-
[Windows HostProcess Pod](/zh-cn/docs/tasks/configure-pod-container/create-hostprocess-pod/)
555-
这些 Pod 中的所有容器都必须以 Windows HostProcess 容器方式运行。
556-
HostProcess Pod 可以直接运行在主机上,它也能像 Linux 特权容器一样,用于执行管理任务。
572+
<!--
573+
### Windows priviledged containers
574+
-->
575+
### Windows 特权容器 {#windows-priviledged-containers}
576+
577+
{{< feature-state for_k8s_version="v1.26" state="stable" >}}
557578

558-
{{< note >}}
559579
<!--
560-
Your {{< glossary_tooltip text="container runtime" term_id="container-runtime" >}} must support the concept of a privileged container for this setting to be relevant.
580+
In Windows, you can create a [Windows HostProcess pod](/docs/tasks/configure-pod-container/create-hostprocess-pod)
581+
by setting the `windowsOptions.hostProcess` flag on the security context of the pod spec. All containers in these
582+
pods must run as Windows HostProcess containers. HostProcess pods run directly on the host and can also be used
583+
to perform administrative tasks as is done with Linux privileged containers. In order to use this feature, the
584+
`WindowsHostProcessContainers` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) must be enabled.
561585
-->
562-
你的{{< glossary_tooltip text="容器运行时" term_id="container-runtime" >}}必须支持特权容器的概念才能使用这一配置。
563-
{{< /note >}}
586+
在 Windows 中,你可以使用 Pod 规约中安全上下文的 `windowsOptions.hostProcess` 参数来创建
587+
[Windows HostProcess Pod](/zh-cn/docs/tasks/configure-pod-container/create-hostprocess-pod/)
588+
这些 Pod 中的所有容器都必须以 Windows HostProcess 容器方式运行。
589+
HostProcess Pod 可以直接运行在主机上,它也能像 Linux 特权容器一样,用于执行管理任务。
590+
想要使用此特性,`WindowsHostProcessContainers`
591+
[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)必须被启用。
564592

565593
<!--
566594
## Static Pods

0 commit comments

Comments
 (0)