Skip to content

Commit 571ae1d

Browse files
authored
Merge pull request #33995 from kinzhi/kinzhi132
[zh]Update content/zh/docs/concepts/services-networking/dual-stack.md
2 parents 1a14ab9 + 583df7d commit 571ae1d

File tree

1 file changed

+42
-11
lines changed

1 file changed

+42
-11
lines changed

content/zh/docs/concepts/services-networking/dual-stack.md

Lines changed: 42 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ The following prerequisites are needed in order to utilize IPv4/IPv6 dual-stack
7878
Kubernetes versions, refer to the documentation for that version
7979
of Kubernetes.
8080
* Provider support for dual-stack networking (Cloud provider or otherwise must be able to provide Kubernetes nodes with routable IPv4/IPv6 network interfaces)
81-
* A [network plugin](/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/) that supports dual-stack networking
81+
* A [network plugin](/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/) that supports dual-stack networking.
8282
-->
8383
* Kubernetes 1.20 版本或更高版本,有关更早 Kubernetes 版本的使用双栈服务的信息,
8484
请参考对应版本的 Kubernetes 文档。
@@ -91,7 +91,10 @@ The following prerequisites are needed in order to utilize IPv4/IPv6 dual-stack
9191
-->
9292
## 配置 IPv4/IPv6 双协议栈
9393

94-
94+
<!--
95+
To configure IPv4/IPv6 dual-stack, set dual-stack cluster network assignments:
96+
-->
97+
如果配置 IPv4/IPv6 双栈,请分配双栈集群网络:
9598
<!--
9699
* kube-apiserver:
97100
* `--service-cluster-ip-range=<IPv4 CIDR>,<IPv6 CIDR>`
@@ -142,7 +145,7 @@ IPv6 CIDR 的一个例子:`fdXY:IJKL:MNOP:15::/64`
142145
## 服务
143146

144147
<!--
145-
You can create {{< glossary_tooltip text="Services" term_id="service" >}} which can use IPv4, IPv6, or both.
148+
You can create {{< glossary_tooltip text="Services" term_id="service" >}} which can use IPv4, IPv6, or both.
146149
147150
The address family of a Service defaults to the address family of the first service cluster IP range (configured via the `--service-cluster-ip-range` flag to the kube-apiserver).
148151
@@ -195,7 +198,6 @@ You can set `.spec.ipFamilies` to any of the following array values:
195198
- `["IPv6"]`
196199
- `["IPv4","IPv6"]` (dual stack)
197200
- `["IPv6","IPv4"]` (dual stack)
198-
199201
-->
200202
- `["IPv4"]`
201203
- `["IPv6"]`
@@ -224,14 +226,13 @@ These examples demonstrate the behavior of various dual-stack Service configurat
224226
<!--
225227
1. This Service specification does not explicitly define `.spec.ipFamilyPolicy`. When you create this Service, Kubernetes assigns a cluster IP for the Service from the first configured `service-cluster-ip-range` and sets the `.spec.ipFamilyPolicy` to `SingleStack`. ([Services without selectors](/docs/concepts/services-networking/service/#services-without-selectors) and [headless Services](/docs/concepts/services-networking/service/#headless-services) with selectors will behave in this same way.)
226228
-->
227-
228229
1. 此服务规约中没有显式设定 `.spec.ipFamilyPolicy`。当你创建此服务时,Kubernetes
229230
从所配置的第一个 `service-cluster-ip-range` 种为服务分配一个集群IP,并设置
230231
`.spec.ipFamilyPolicy``SingleStack`
231232
[无选择算符的服务](/zh/docs/concepts/services-networking/service/#services-without-selectors)
232233
[无头服务](/zh/docs/concepts/services-networking/service/#headless-services)的行为方式
233234
与此相同。)
234-
235+
235236
{{< codenew file="service/networking/dual-stack-default-svc.yaml" >}}
236237

237238
<!--
@@ -274,7 +275,7 @@ These examples demonstrate the behavior of various dual-stack Service configurat
274275
#### 现有服务的双栈默认值
275276

276277
<!--
277-
These examples demonstrate the default behavior when dual-stack is newly enabled on a cluster where Services already exist. (Upgrading an existing cluster to 1.21 or beyond will enable dual-stack.)
278+
These examples demonstrate the default behavior when dual-stack is newly enabled on a cluster where Services already exist. (Upgrading an existing cluster to 1.21 or beyond will enable dual-stack.)
278279
-->
279280
下面示例演示了在服务已经存在的集群上新启用双栈时的默认行为。
280281
(将现有集群升级到 1.21 或者更高版本会启用双协议栈支持。)
@@ -296,7 +297,7 @@ These examples demonstrate the default behavior when dual-stack is newly enabled
296297
```shell
297298
kubectl get svc my-service -o yaml
298299
```
299-
300+
300301
```yaml
301302
apiVersion: v1
302303
kind: Service
@@ -341,7 +342,7 @@ These examples demonstrate the default behavior when dual-stack is newly enabled
341342
```shell
342343
kubectl get svc my-service -o yaml
343344
```
344-
345+
345346
```yaml
346347
apiVersion: v1
347348
kind: Service
@@ -361,7 +362,7 @@ These examples demonstrate the default behavior when dual-stack is newly enabled
361362
protocol: TCP
362363
targetPort: 80
363364
selector:
364-
app: MyApp
365+
app: MyApp
365366
```
366367

367368
<!--
@@ -470,11 +471,41 @@ Ensure your {{< glossary_tooltip text="CNI" term_id="cni" >}} provider supports
470471
确认你的 {{< glossary_tooltip text="CNI" term_id="cni" >}} 驱动支持 IPv6。
471472
{{< /note >}}
472473

474+
<!--
475+
## Windows support
476+
477+
Kubernetes on Windows does not support single-stack "IPv6-only" networking. However,
478+
dual-stack IPv4/IPv6 networking for pods and nodes with single-family services
479+
is supported.
480+
481+
You can use IPv4/IPv6 dual-stack networking with `l2bridge` networks.
482+
483+
{{< note >}}
484+
Overlay (VXLAN) networks on Windows **do not** support dual-stack networking.
485+
{{< /note >}}
486+
487+
You can read more about the different network modes for Windows within the
488+
[Networking on Windows](/docs/concepts/services-networking/windows-networking#network-modes) topic.
489+
-->
490+
## Windows 支持
491+
492+
Windows 上的 Kubernetes 不支持单栈“仅 IPv6” 网络。 然而,
493+
对于 Pod 和节点而言,仅支持单栈形式服务的双栈 IPv4/IPv6 网络是被支持的。
494+
495+
你可以使用 `l2bridge` 网络来实现 IPv4/IPv6 双栈联网。
496+
497+
{{< note >}}
498+
Windows 上的 Overlay (VXLAN) 网络**不**支持双栈网络。
499+
{{< /note >}}
500+
501+
关于 Windows 的不同网络模式,你可以进一步阅读
502+
[Windows 上的网络](/zh/docs/concepts/services-networking/windows-networking#network-modes)。
503+
473504
## {{% heading "whatsnext" %}}
474505

475506
<!--
476507
* [Validate IPv4/IPv6 dual-stack](/docs/tasks/network/validate-dual-stack) networking
477-
* [Enable dual-stack networking using kubeadm ](/docs/setup/production-environment/tools/kubeadm/dual-stack-support/)
508+
* [Enable dual-stack networking using kubeadm](/docs/setup/production-environment/tools/kubeadm/dual-stack-support/)
478509
-->
479510
* [验证 IPv4/IPv6 双协议栈](/zh/docs/tasks/network/validate-dual-stack)网络
480511
* [使用 kubeadm 启用双协议栈网络](/zh/docs/setup/production-environment/tools/kubeadm/dual-stack-support/)

0 commit comments

Comments
 (0)