From 98e587befbb335360fce0011474c21e4a52326b3 Mon Sep 17 00:00:00 2001 From: Gao Qian Date: Sun, 18 Dec 2022 20:28:03 -0500 Subject: [PATCH] [zh-cn] sync concepts/windows/intro.md Signed-off-by: Gao Qian --- content/zh-cn/docs/concepts/windows/intro.md | 34 ++++++++++++++++---- 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/content/zh-cn/docs/concepts/windows/intro.md b/content/zh-cn/docs/concepts/windows/intro.md index 794b1755a7c..3251b330b54 100644 --- a/content/zh-cn/docs/concepts/windows/intro.md +++ b/content/zh-cn/docs/concepts/windows/intro.md @@ -432,11 +432,11 @@ work between Windows and Linux: The following list documents differences between how Pod specifications work between Windows and Linux: * `hostIPC` and `hostpid` - host namespace sharing is not possible on Windows -* `hostNetwork` - There is no Windows OS support to share the host network +* `hostNetwork` - [see below](/docs/concepts/windows/intro#compatibility-v1-pod-spec-containers-hostnetwork) * `dnsPolicy` - setting the Pod `dnsPolicy` to `ClusterFirstWithHostNet` is not supported on Windows because host networking is not provided. Pods always run with a container network. -* `podSecurityContext` (see below) +* `podSecurityContext` [see below](/docs/concepts/windows/intro#compatibility-v1-pod-spec-containers-securitycontext) * `shareProcessNamespace` - this is a beta feature, and depends on Linux namespaces which are not implemented on Windows. Windows cannot share process namespaces or the container's root filesystem. Only the network can be shared. @@ -446,10 +446,10 @@ The following list documents differences between how Pod specifications work bet 以下列表记录了 Pod 规范在 Windows 和 Linux 之间的工作方式差异: * `hostIPC` 和 `hostpid` - 不能在 Windows 上共享主机命名空间。 -* `hostNetwork` - Windows 操作系统不支持共享主机网络。 +* `hostNetwork` - [参见下文](#compatibility-v1-pod-spec-containers-hostnetwork) * `dnsPolicy` - Windows 不支持将 Pod `dnsPolicy` 设为 `ClusterFirstWithHostNet`, 因为未提供主机网络。Pod 始终用容器网络运行。 -* `podSecurityContext`(参见下文) +* `podSecurityContext` [参见下文](#compatibility-v1-pod-spec-containers-securitycontext) * `shareProcessNamespace` - 这是一个 beta 版功能特性,依赖于 Windows 上未实现的 Linux 命名空间。 Windows 无法共享进程命名空间或容器的根文件系统(root filesystem)。 只能共享网络。 @@ -482,11 +482,33 @@ The following list documents differences between how Pod specifications work bet * 你无法为卷挂载启用 `mountPropagation`,因为这在 Windows 上不支持。 +#### hostNetwork 的字段兼容性 {#compatibility-v1-pod-spec-containers-hostnetwork} + +{{< feature-state for_k8s_version="v1.26" state="alpha" >}} + +现在,kubelet 可以请求在 Windows 节点上运行的 Pod 使用主机的网络命名空间,而不是创建新的 Pod 网络命名空间。 +要启用此功能,请将 `--feature-gates=WindowsHostNetwork=true` 传递给 kubelet。 + +{{< note >}} + +此功能需要支持该功能的容器运行时。 +{{< /note >}} + + -##### Pod 安全上下文的字段兼容性 {#compatibility-v1-pod-spec-containers-securitycontext} +#### Pod 安全上下文的字段兼容性 {#compatibility-v1-pod-spec-containers-securitycontext} Pod 的所有 [`securityContext`](/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context) 字段都无法在 Windows 上生效。