Skip to content

Commit 9064ddf

Browse files
committed
[zh] Sync /windows/intro.md
1 parent 64af462 commit 9064ddf

File tree

1 file changed

+98
-31
lines changed
  • content/zh-cn/docs/concepts/windows

1 file changed

+98
-31
lines changed

content/zh-cn/docs/concepts/windows/intro.md

Lines changed: 98 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ of operating system.
2828
-->
2929
在许多组织中,所运行的很大一部分服务和应用是 Windows 应用。
3030
[Windows 容器](https://aka.ms/windowscontainers)提供了一种封装进程和包依赖项的方式,
31-
从而简化了 DevOps 实践,令 Windows 应用程序同样遵从云原生模式
31+
从而简化了 DevOps 实践,令 Windows 应用同样遵从云原生模式
3232

3333
对于同时投入基于 Windows 应用和 Linux 应用的组织而言,他们不必寻找不同的编排系统来管理其工作负载,
3434
使其跨部署的运营效率得以大幅提升,而不必关心所用的操作系统。
@@ -48,7 +48,7 @@ multiple operating systems.
4848
While you can only run the {{< glossary_tooltip text="control plane" term_id="control-plane" >}} on Linux,
4949
you can deploy worker nodes running either Windows or Linux.
5050
-->
51-
## Kubernetes 中的 Windows 节点 {#windows-nodes-in-k8s}
51+
## Kubernetes 中的 Windows 节点 {#windows-nodes-in-k8s}
5252

5353
若要在 Kubernetes 中启用对 Windows 容器的编排,可以在现有的 Linux 集群中包含 Windows 节点。
5454
在 Kubernetes 上调度 {{< glossary_tooltip text="Pod" term_id="pod" >}} 中的 Windows 容器与调度基于 Linux 的容器类似。
@@ -60,13 +60,14 @@ you can deploy worker nodes running either Windows or Linux.
6060
<!--
6161
Windows {{< glossary_tooltip text="nodes" term_id="node" >}} are
6262
[supported](#windows-os-version-support) provided that the operating system is
63-
Windows Server 2019.
63+
Windows Server 2019 or Windows Server 2022.
6464
6565
This document uses the term *Windows containers* to mean Windows containers with
6666
process isolation. Kubernetes does not support running Windows containers with
6767
[Hyper-V isolation](https://docs.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/hyperv-container).
6868
-->
69-
支持 Windows {{< glossary_tooltip text="节点" term_id="node" >}}的前提是操作系统为 Windows Server 2019。
69+
支持 Windows {{< glossary_tooltip text="节点" term_id="node" >}}的前提是操作系统为
70+
Windows Server 2019 或 Windows Server 2022。
7071

7172
本文使用术语 **Windows 容器**表示具有进程隔离能力的 Windows 容器。
7273
Kubernetes 不支持使用
@@ -85,7 +86,7 @@ including:
8586
[HostProcess Containers](/docs/tasks/configure-pod-container/create-hostprocess-pod/) offer similar functionality.
8687
* TerminationGracePeriod: requires containerD
8788
-->
88-
## 兼容性与局限性 {#limitations}
89+
## 兼容性与局限性 {#limitations}
8990

9091
某些节点层面的功能特性仅在使用特定[容器运行时](#container-runtime)时才可用;
9192
另外一些特性则在 Windows 节点上不可用,包括:
@@ -109,7 +110,8 @@ functionality which are outlined in this section.
109110
Windows 节点并不支持共享命名空间的所有功能特性。
110111
有关更多详细信息,请参考 [API 兼容性](#api)
111112

112-
有关 Kubernetes 测试时所使用的 Windows 版本的详细信息,请参考 [Windows 操作系统版本兼容性](#windows-os-version-support)
113+
有关 Kubernetes 测试时所使用的 Windows 版本的详细信息,请参考
114+
[Windows 操作系统版本兼容性](#windows-os-version-support)
113115

114116
从 API 和 kubectl 的角度来看,Windows 容器的行为与基于 Linux 的容器非常相似。
115117
然而,在本节所概述的一些关键功能上,二者存在一些显著差异。
@@ -120,7 +122,7 @@ Windows 节点并不支持共享命名空间的所有功能特性。
120122
Key Kubernetes elements work the same way in Windows as they do in Linux. This
121123
section refers to several key workload abstractions and how they map to Windows.
122124
-->
123-
### 与 Linux 比较 {#comparison-with-Linux-similarities}
125+
### 与 Linux 比较 {#comparison-with-Linux-similarities}
124126

125127
Kubernetes 关键组件在 Windows 上的工作方式与在 Linux 上相同。
126128
本节介绍几个关键的工作负载抽象及其如何映射到 Windows。
@@ -140,6 +142,7 @@ Kubernetes 关键组件在 Windows 上的工作方式与在 Linux 上相同。
140142
你不可以在同一个 Pod 中部署 Windows 和 Linux 容器。
141143
Pod 中的所有容器都调度到同一 Node 上,每个 Node 代表一个特定的平台和体系结构。
142144
Windows 容器支持以下 Pod 能力、属性和事件:
145+
143146
<!--
144147
* Single or multiple containers per Pod with process isolation and volume sharing
145148
* Pod `status` fields
@@ -257,7 +260,7 @@ Pod、工作负载资源和 Service 是在 Kubernetes 上管理 Windows 工作
257260
258261
Some kubelet command line options behave differently on Windows, as described below:
259262
-->
260-
### kubelet 的命令行选项 {#kubelet-compatibility}
263+
### kubelet 的命令行选项 {#kubelet-compatibility}
261264

262265
某些 kubelet 命令行选项在 Windows 上的行为不同,如下所述:
263266

@@ -296,7 +299,7 @@ and container runtime. Some workload properties were designed for Linux, and fai
296299
297300
At a high level, these OS concepts are different:
298301
-->
299-
### API 兼容性 {#api}
302+
### API 兼容性 {#api}
300303

301304
由于操作系统和容器运行时的缘故,Kubernetes API 在 Windows 上的工作方式存在细微差异。
302305
某些工作负载属性是为 Linux 设计的,无法在 Windows 上运行。
@@ -367,7 +370,7 @@ work between Windows and Linux:
367370
node. They should be applied to all containers as a best practice if the operator
368371
wants to avoid overprovisioning entirely.
369372
-->
370-
#### 容器规约的字段兼容性 {#compatibility-v1-pod-spec-containers}
373+
#### 容器规约的字段兼容性 {#compatibility-v1-pod-spec-containers}
371374

372375
以下列表记录了 Pod 容器规约在 Windows 和 Linux 之间的工作方式差异:
373376

@@ -437,7 +440,7 @@ The following list documents differences between how Pod specifications work bet
437440
which are not implemented on Windows. Windows cannot share process namespaces or
438441
the container's root filesystem. Only the network can be shared.
439442
-->
440-
#### Pod 规约的字段兼容性 {#compatibility-v1-pod}
443+
#### Pod 规约的字段兼容性 {#compatibility-v1-pod}
441444

442445
以下列表记录了 Pod 规约在 Windows 和 Linux 之间的工作方式差异:
443446

@@ -446,7 +449,7 @@ The following list documents differences between how Pod specifications work bet
446449
* `dnsPolicy` - Windows 不支持将 Pod `dnsPolicy` 设为 `ClusterFirstWithHostNet`
447450
因为未提供主机网络。Pod 始终用容器网络运行。
448451
* `podSecurityContext` [参见下文](#compatibility-v1-pod-spec-containers-securitycontext)
449-
* `shareProcessNamespace` - 这是一个 beta 版功能特性,依赖于 Windows 上未实现的 Linux 命名空间。
452+
* `shareProcessNamespace` - 这是一个 Beta 版功能特性,依赖于 Windows 上未实现的 Linux 命名空间。
450453
Windows 无法共享进程命名空间或容器的根文件系统(root filesystem)。
451454
只能共享网络。
452455
<!--
@@ -471,7 +474,7 @@ The following list documents differences between how Pod specifications work bet
471474
最后使用正常的 Windows 关机行为终止所有进程。
472475
5 秒默认值实际上位于[容器内](https://github.com/moby/moby/issues/25982#issuecomment-426441183)
473476
Windows 注册表中,因此在构建容器时可以覆盖这个值。
474-
* `volumeDevices` - 这是一个 beta 版功能特性,未在 Windows 上实现。
477+
* `volumeDevices` - 这是一个 Beta 版功能特性,未在 Windows 上实现。
475478
Windows 无法将原始块设备挂接到 Pod。
476479
* `volumes`
477480
* 如果你定义一个 `emptyDir` 卷,则你无法将卷源设为 `memory`
@@ -485,7 +488,7 @@ The following list documents differences between how Pod specifications work bet
485488
The kubelet can now request that pods running on Windows nodes use the host's network namespace instead
486489
of creating a new pod network namespace. To enable this functionality pass `--feature-gates=WindowsHostNetwork=true` to the kubelet.
487490
-->
488-
#### hostNetwork 的字段兼容性 {#compatibility-v1-pod-spec-containers-hostnetwork}
491+
#### hostNetwork 的字段兼容性 {#compatibility-v1-pod-spec-containers-hostnetwork}
489492

490493
{{< feature-state for_k8s_version="v1.26" state="alpha" >}}
491494

@@ -505,9 +508,9 @@ This functionality requires a container runtime that supports this functionality
505508
Only the `securityContext.runAsNonRoot` and `securityContext.windowsOptions` from the Pod
506509
[`securityContext`](/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context) fields work on Windows.
507510
-->
508-
#### Pod 安全上下文的字段兼容性 {#compatibility-v1-pod-spec-containers-securitycontext}
511+
#### Pod 安全上下文的字段兼容性 {#compatibility-v1-pod-spec-containers-securitycontext}
509512

510-
Pod 的 [`securityContext`](/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context)
513+
Pod 的 [`securityContext`](/zh-cn/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context)
511514
中只有 `securityContext.runAsNonRoot``securityContext.windowsOptions` 字段在 Windows 上生效。
512515

513516
<!--
@@ -518,7 +521,7 @@ The node problem detector (see
518521
has preliminary support for Windows.
519522
For more information, visit the project's [GitHub page](https://github.com/kubernetes/node-problem-detector#windows).
520523
-->
521-
## 节点问题检测器 {#node-problem-detector}
524+
## 节点问题检测器 {#node-problem-detector}
522525

523526
节点问题检测器(参考[节点健康监测](/zh-cn/docs/tasks/debug/debug-cluster/monitor-node-health/))初步支持 Windows。
524527
有关更多信息,请访问该项目的 [GitHub 页面](https://github.com/kubernetes/node-problem-detector#windows)
@@ -534,7 +537,7 @@ containers, share a common network endpoint (same IPv4 and / or IPv6 address, sa
534537
network port spaces). Kubernetes uses pause containers to allow for worker containers
535538
crashing or restarting without losing any of the networking configuration.
536539
-->
537-
## Pause 容器 {#pause-container}
540+
## Pause 容器 {#pause-container}
538541

539542
在 Kubernetes Pod 中,首先创建一个基础容器或 “pause” 容器来承载容器。
540543
在 Linux 中,构成 Pod 的 cgroup 和命名空间维持持续存在需要一个进程;
@@ -577,7 +580,7 @@ into each node in the cluster so that Pods can run there.
577580
578581
The following container runtimes work with Windows:
579582
-->
580-
## 容器运行时 {#container-runtime}
583+
## 容器运行时 {#container-runtime}
581584

582585
你需要将{{< glossary_tooltip text="容器运行时" term_id="container-runtime" >}}安装到集群中的每个节点,
583586
这样 Pod 才能在这些节点上运行。
@@ -596,7 +599,7 @@ as the container runtime for Kubernetes nodes that run Windows.
596599
597600
Learn how to [install ContainerD on a Windows node](/docs/setup/production-environment/container-runtimes/#containerd).
598601
-->
599-
### ContainerD {#containerd}
602+
### ContainerD
600603

601604
{{< feature-state for_k8s_version="v1.20" state="stable" >}}
602605

@@ -624,7 +627,7 @@ is available as a container runtime for all Windows Server 2019 and later versio
624627
625628
See [Install MCR on Windows Servers](https://docs.mirantis.com/mcr/20.10/install/mcr-windows.html) for more information.
626629
-->
627-
### Mirantis 容器运行时 {#mcr}
630+
### Mirantis 容器运行时 {#mcr}
628631

629632
[Mirantis 容器运行时](https://docs.mirantis.com/mcr/20.10/overview.html)(MCR)
630633
可作为所有 Windows Server 2019 和更高版本的容器运行时。
@@ -641,7 +644,7 @@ operating system of Windows Server 2019 are fully supported.
641644
For Kubernetes v{{< skew currentVersion >}}, operating system compatibility for Windows nodes (and Pods)
642645
is as follows:
643646
-->
644-
## Windows 操作系统版本兼容性 {#windows-os-version-support}
647+
## Windows 操作系统版本兼容性 {#windows-os-version-support}
645648

646649
在 Windows 节点上,如果主机操作系统版本必须与容器基础镜像操作系统版本匹配,
647650
则会应用严格的兼容性规则。
@@ -654,13 +657,79 @@ Windows Server LTSC release
654657
: Windows Server 2022
655658

656659
Windows Server SAC release
657-
: Windows Server version 20H2
660+
: Windows Server version 20H2
658661

659662
<!--
660663
The Kubernetes [version-skew policy](/docs/setup/release/version-skew-policy/) also applies.
661664
-->
662665
也适用 Kubernetes [版本偏差策略](/zh-cn/releases/version-skew-policy/)
663666

667+
<!--
668+
## Hardware recommendations and considerations {#windows-hardware-recommendations}
669+
-->
670+
## 硬件建议和注意事项 {#windows-hardware-recommendations}
671+
672+
{{% thirdparty-content %}}
673+
674+
{{< note >}}
675+
<!--
676+
The following hardware specifications outlined here should be regarded as sensible default values.
677+
They are not intended to represent minimum requirements or specific recommendations for production environments.
678+
Depending on the requirements for your workload these values may need to be adjusted.
679+
-->
680+
这里列出的硬件规格应被视为合理的默认值。
681+
它们并不代表生产环境的最低要求或具体推荐。
682+
根据你的工作负载要求,这些值可能需要进行调整。
683+
{{< /note >}}
684+
685+
<!--
686+
- 64-bit processor 4 CPU cores or more, capable of supporting virtualization
687+
- 8GB or more of RAM
688+
- 50GB or more of free disk space
689+
-->
690+
- 64 位处理器,4 核或更多的 CPU,能够支持虚拟化
691+
- 8GB 或更多的 RAM
692+
- 50GB 或更多的可用磁盘空间
693+
694+
<!--
695+
Refer to
696+
[Hardware requirements for Windows Server Microsoft documentation](https://learn.microsoft.com/en-us/windows-server/get-started/hardware-requirements)
697+
for the most up-to-date information on minimum hardware requirements. For guidance on deciding on resources for
698+
production worker nodes refer to [Production worker nodes Kubernetes documentation](https://kubernetes.io/docs/setup/production-environment/#production-worker-nodes).
699+
-->
700+
有关最新的最低硬件要求信息,
701+
请参考[微软文档:Windows Server 的硬件要求](https://learn.microsoft.com/zh-cn/windows-server/get-started/hardware-requirements)
702+
有关决定生产工作节点资源的指导信息,
703+
请参考 [Kubernetes 文档:生产用工作节点](https://kubernetes.io/zh-cn/docs/setup/production-environment/#production-worker-nodes)
704+
705+
<!--
706+
To optimize system resources, if a graphical user interface is not required,
707+
it may be preferable to use a Windows Server OS installation that excludes
708+
the [Windows Desktop Experience](https://learn.microsoft.com/en-us/windows-server/get-started/install-options-server-core-desktop-experience)
709+
installation option, as this configuration typically frees up more system
710+
resources.
711+
-->
712+
为了优化系统资源,如果图形用户界面不是必需的,最好选择一个不包含
713+
[Windows 桌面体验](https://learn.microsoft.com/zh-cn/windows-server/get-started/install-options-server-core-desktop-experience)安装选项的
714+
Windows Server 操作系统安装包,因为这种配置通常会释放更多的系统资源。
715+
716+
<!--
717+
In assessing disk space for Windows worker nodes, take note that Windows container images are typically larger than
718+
Linux container images, with container image sizes ranging
719+
from [300MB to over 10GB](https://techcommunity.microsoft.com/t5/containers/nano-server-x-server-core-x-server-which-base-image-is-the-right/ba-p/2835785)
720+
for a single image. Additionally, take note that the `C:` drive in Windows containers represents a virtual free size of
721+
20GB by default, which is not the actual consumed space, but rather the disk size for which a single container can grow
722+
to occupy when using local storage on the host.
723+
See [Containers on Windows - Container Storage Documentation](https://learn.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/container-storage#storage-limits)
724+
for more detail.
725+
-->
726+
在估算 Windows 工作节点的磁盘空间时,需要注意 Windows 容器镜像通常比 Linux 容器镜像更大,
727+
单个镜像的容器大小范围从 [300MB 到超过 10GB](https://techcommunity.microsoft.com/t5/containers/nano-server-x-server-core-x-server-which-base-image-is-the-right/ba-p/2835785)
728+
此外,需要注意 Windows 容器中的 `C:` 驱动器默认呈现的虚拟剩余空间为 20GB,
729+
这不是实际的占用空间,而是使用主机上的本地存储时单个容器可以最多占用的磁盘大小。
730+
有关更多详细信息,
731+
请参见[在 Windows 上运行容器 - 容器存储文档](https://learn.microsoft.com/zh-cn/virtualization/windowscontainers/manage-containers/container-storage#storage-limits)
732+
664733
<!--
665734
## Getting help and troubleshooting {#troubleshooting}
666735
@@ -675,7 +744,7 @@ troubleshooting assistance from other contributors. Follow the
675744
instructions in the
676745
SIG Windows [contributing guide on gathering logs](https://github.com/kubernetes/community/blob/master/sig-windows/CONTRIBUTING.md#gathering-logs).
677746
-->
678-
## 获取帮助和故障排查 {#troubleshooting}
747+
## 获取帮助和故障排查 {#troubleshooting}
679748

680749
对 Kubernetes 集群进行故障排查的主要帮助来源应始于[故障排查](/zh-cn/docs/tasks/debug/)页面。
681750

@@ -695,14 +764,12 @@ reported previously and comment with your experience on the issue and add additi
695764
logs. SIG Windows channel on the Kubernetes Slack is also a great avenue to get some initial support and
696765
troubleshooting ideas prior to creating a ticket.
697766
-->
698-
### 报告问题和功能请求 {#report-issue-and-feature-request}
767+
### 报告问题和功能请求 {#report-issue-and-feature-request}
699768

700769
如果你发现疑似 bug,或者你想提出功能请求,请按照
701770
[SIG Windows 贡献指南](https://github.com/kubernetes/community/blob/master/sig-windows/CONTRIBUTING.md#reporting-issues-and-feature-requests)
702-
新建一个 Issue。
703-
你应该先搜索 issue 列表,以防之前报告过这个问题,凭你对该问题的经验添加评论,
704-
并随附日志信息。
705-
Kubernetes Slack 上的 SIG Windows 频道也是一个很好的途径,
771+
新建一个 Issue。你应该先搜索 Issue 列表,以防之前报告过这个问题,凭你对该问题的经验添加评论,
772+
并随附日志信息。Kubernetes Slack 上的 SIG Windows 频道也是一个很好的途径,
706773
可以在创建工单之前获得一些初始支持和故障排查思路。
707774

708775
## {{% heading "whatsnext" %}}
@@ -715,7 +782,7 @@ plane to manage the cluster it, and nodes to run your workloads.
715782
716783
The Kubernetes [cluster API](https://cluster-api.sigs.k8s.io/) project also provides means to automate deployment of Windows nodes.
717784
-->
718-
## 部署工具 {#deployment-tools}
785+
## 部署工具 {#deployment-tools}
719786

720787
kubeadm 工具帮助你部署 Kubernetes 集群,提供管理集群的控制平面以及运行工作负载的节点。
721788

@@ -732,7 +799,7 @@ Information on the different Windows Server servicing channels
732799
including their support models can be found at
733800
[Windows Server servicing channels](https://docs.microsoft.com/en-us/windows-server/get-started/servicing-channels-comparison).
734801
-->
735-
## Windows 分发渠道 {#windows-distribution-channels}
802+
## Windows 分发渠道 {#windows-distribution-channels}
736803

737804
有关 Windows 分发渠道的详细阐述,请参考
738805
[Microsoft 文档](https://docs.microsoft.com/zh-cn/windows-server/get-started-19/servicing-channels-19)

0 commit comments

Comments
 (0)