8
8
description : >
9
9
为 Pod 和 Service 分配 IPv4 和 IPv6 地址
10
10
content_type : concept
11
- weight : 70
11
+ weight : 90
12
12
---
13
13
14
14
<!--
@@ -27,7 +27,7 @@ reviewers:
27
27
- khenidak
28
28
- aramase
29
29
- bridgetkromhout
30
- weight: 70
30
+ weight: 90
31
31
-->
32
32
33
33
<!-- overview -->
@@ -247,11 +247,11 @@ These examples demonstrate the behavior of various dual-stack Service configurat
247
247
this Service, Kubernetes assigns a cluster IP for the Service from the first configured
248
248
`service-cluster-ip-range` and sets the `.spec.ipFamilyPolicy` to `SingleStack`. ([Services
249
249
without selectors](/docs/concepts/services-networking/service/#services-without-selectors) and
250
- [headless Services](/docs/concepts/services-networking/service/#headless-services) with selectors
250
+ [headless Services](/docs/concepts/services-networking/service/#headless-services) with selectors
251
251
will behave in this same way.)
252
252
-->
253
253
1 . 此服务规约中没有显式设定 ` .spec.ipFamilyPolicy ` 。当你创建此服务时,Kubernetes
254
- 从所配置的第一个 ` service-cluster-ip-range ` 种为服务分配一个集群IP ,并设置
254
+ 从所配置的第一个 ` service-cluster-ip-range ` 中为服务分配一个集群 IP ,并设置
255
255
` .spec.ipFamilyPolicy ` 为 ` SingleStack ` 。
256
256
([ 无选择算符的服务] ( /zh-cn/docs/concepts/services-networking/service/#services-without-selectors )
257
257
和[ 无头服务] ( /zh-cn/docs/concepts/services-networking/service/#headless-services ) 的行为方式
@@ -263,14 +263,14 @@ These examples demonstrate the behavior of various dual-stack Service configurat
263
263
1. This Service specification explicitly defines `PreferDualStack` in `.spec.ipFamilyPolicy`. When
264
264
you create this Service on a dual-stack cluster, Kubernetes assigns both IPv4 and IPv6
265
265
addresses for the service. The control plane updates the `.spec` for the Service to record the IP
266
- address assignments. The field `.spec.ClusterIPs` is the primary field, and contains both assigned
266
+ address assignments. The field `.spec.ClusterIPs` is the primary field, and contains both assigned
267
267
IP addresses; `.spec.ClusterIP` is a secondary field with its value calculated from
268
268
`.spec.ClusterIPs`.
269
-
269
+
270
270
* For the `.spec.ClusterIP` field, the control plane records the IP address that is from the
271
- same address family as the first service cluster IP range.
271
+ same address family as the first service cluster IP range.
272
272
* On a single-stack cluster, the `.spec.ClusterIPs` and `.spec.ClusterIP` fields both only list
273
- one address.
273
+ one address.
274
274
* On a cluster with dual-stack enabled, specifying `RequireDualStack` in `.spec.ipFamilyPolicy`
275
275
behaves the same as `PreferDualStack`.
276
276
-->
@@ -364,8 +364,8 @@ dual-stack.)
364
364
365
365
<!--
366
366
1. When dual-stack is enabled on a cluster, existing
367
- [headless Services](/docs/concepts/services-networking/service/#headless-services) with selectors
368
- are configured by the control plane to set ` .spec.ipFamilyPolicy` to `SingleStack` and set
367
+ [headless Services](/docs/concepts/services-networking/service/#headless-services) with selectors are
368
+ configured by the control plane to set ` .spec.ipFamilyPolicy` to `SingleStack` and set
369
369
` .spec.ipFamilies` to the address family of the first service cluster IP range (configured via the
370
370
` --service-cluster-ip-range` flag to the kube-apiserver) even though `.spec.ClusterIP` is set to
371
371
` None` .
@@ -473,8 +473,8 @@ Services can be changed from single-stack to dual-stack and from dual-stack to s
473
473
474
474
<!--
475
475
For [Headless Services without selectors](/docs/concepts/services-networking/service/#without-selectors)
476
- and without `.spec.ipFamilyPolicy` explicitly set, the `.spec.ipFamilyPolicy` field defaults
477
- to `RequireDualStack`.
476
+ and without `.spec.ipFamilyPolicy` explicitly set, the `.spec.ipFamilyPolicy` field defaults to
477
+ ` RequireDualStack` .
478
478
-->
479
479
对于[不带选择算符的无头服务](/zh-cn/docs/concepts/services-networking/service/#without-selectors),
480
480
若没有显式设置 `.spec.ipFamilyPolicy`,则 `.spec.ipFamilyPolicy`
0 commit comments