You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/zh-cn/docs/concepts/workloads/pods/_index.md
+42-14Lines changed: 42 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -537,30 +537,58 @@ Pod 中的容器所看到的系统主机名与为 Pod 配置的 `name` 属性值
537
537
538
538
<!--
539
539
## 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.
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。
542
556
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.
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.
0 commit comments