Skip to content

Commit cd052d9

Browse files
authored
Merge pull request #29369 from EricWvi/main
[zh] Concept files to sync for 1.22 - (8) Service
2 parents 31ef56b + cd9dc4e commit cd052d9

File tree

5 files changed

+151
-34
lines changed

5 files changed

+151
-34
lines changed

content/zh/docs/concepts/services-networking/dns-pod-service.md

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ options ndots:5
9292

9393
<!--
9494
In summary, a pod in the _test_ namespace can successfully resolve either
95-
`data.prod` or `data.prod.cluster.local`.
95+
`data.prod` or `data.prod.svc.cluster.local`.
9696
-->
9797
概括起来,名字空间 `test` 中的 Pod 可以成功地解析 `data.prod` 或者
98-
`data.prod.cluster.local`
98+
`data.prod.svc.cluster.local`
9999

100100
<!--
101101
### DNS Records
@@ -336,11 +336,11 @@ record unless `publishNotReadyAddresses=True` is set on the Service.
336336
<!--
337337
### Pod's setHostnameAsFQDN field {#pod-sethostnameasfqdn-field}
338338

339-
{{< feature-state for_k8s_version="v1.20" state="beta" >}}
339+
{{< feature-state for_k8s_version="v1.22" state="stable" >}}
340340
-->
341341
### Pod 的 setHostnameAsFQDN 字段 {#pod-sethostnameasfqdn-field}
342342

343-
{{< feature-state for_k8s_version="v1.20" state="beta" >}}
343+
{{< feature-state for_k8s_version="v1.22" state="stable" >}}
344344

345345
<!--
346346
When a Pod is configured to have fully qualified domain name (FQDN), its hostname is the short hostname. For example, if you have a Pod with the fully qualified domain name `busybox-1.default-subdomain.my-namespace.svc.cluster-domain.example`, then by default the `hostname` command inside that Pod returns `busybox-1` and the `hostname -fqdn` command returns the FQDN.
@@ -454,6 +454,8 @@ spec:
454454
<!--
455455
### Pod's DNS Config
456456

457+
{{< feature-state for_k8s_version="v1.14" state="stable" >}}
458+
457459
Pod's DNS Config allows users more control on the DNS settings for a Pod.
458460

459461
The `dnsConfig` field is optional and it can work with any `dnsPolicy` settings.
@@ -464,6 +466,8 @@ Below are the properties a user can specify in the `dnsConfig` field:
464466
-->
465467
### Pod 的 DNS 配置 {#pod-dns-config}
466468

469+
{{< feature-state for_k8s_version="v1.14" state="stable" >}}
470+
467471
Pod 的 DNS 配置可让用户对 Pod 的 DNS 设置进行更多控制。
468472

469473
`dnsConfig` 字段是可选的,它可以与任何 `dnsPolicy` 设置一起使用。
@@ -541,6 +545,28 @@ search default.svc.cluster-domain.example svc.cluster-domain.example cluster-dom
541545
options ndots:5
542546
```
543547

548+
<!--
549+
#### Expanded DNS Configuration
550+
551+
{{< feature-state for_k8s_version="1.22" state="alpha" >}}
552+
553+
By default, for Pod's DNS Config, Kubernetes allows at most 6 search domains and
554+
a list of search domains of up to 256 characters.
555+
556+
If the feature gate `ExpandedDNSConfig` is enabled for the kube-apiserver and
557+
the kubelet, it is allowed for Kubernetes to have at most 32 search domains and
558+
a list of search domains of up to 2048 characters.
559+
-->
560+
#### 扩展 DNS 配置 {#expanded-dns-configuration}
561+
562+
{{< feature-state for_k8s_version="1.22" state="alpha" >}}
563+
564+
对于 Pod DNS 配置,Kubernetes 默认允许最多 6 个 搜索域( Search Domain)
565+
以及一个最多 256 个字符的搜索域列表。
566+
567+
如果启用 kube-apiserver 和 kubelet 的特性门控 `ExpandedDNSConfig`,Kubernetes 将可以有最多 32 个
568+
搜索域以及一个最多 2048 个字符的搜索域列表。
569+
544570
<!--
545571
### Feature availability
546572

content/zh/docs/concepts/services-networking/endpoint-slices.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,9 +458,7 @@ implementation in `kube-proxy`.
458458
## {{% heading "whatsnext" %}}
459459

460460
<!--
461-
* [Enabling Endpoint Slices](/docs/tasks/administer-cluster/enabling-endpoint-slices)
462461
* Read [Connecting Applications with Services](/docs/concepts/services-networking/connect-applications-service/)
463462
-->
464-
* 了解[启用 EndpointSlice](/zh/docs/tasks/administer-cluster/enabling-endpointslices)
465463
* 阅读[使用服务连接应用](/zh/docs/concepts/services-networking/connect-applications-service/)
466464

content/zh/docs/concepts/services-networking/ingress.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,21 +421,29 @@ IngressClass 资源包含一个可选的 `parameters` 字段,可用于为该
421421
-->
422422
#### 名字空间域的参数
423423

424-
{{< feature-state for_k8s_version="v1.21" state="alpha" >}}
424+
{{< feature-state for_k8s_version="v1.22" state="beta" >}}
425425

426426
<!--
427427
`Parameters` field has a `scope` and `namespace` field that can be used to
428428
reference a namespace-specific resource for configuration of an Ingress class.
429429
`Scope` field defaults to `Cluster`, meaning, the default is cluster-scoped
430430
resource. Setting `Scope` to `Namespace` and setting the `Namespace` field
431431
will reference a parameters resource in a specific namespace:
432+
433+
Namespace-scoped parameters avoid the need for a cluster-scoped CustomResourceDefinition
434+
for a parameters resource. This further avoids RBAC-related resources
435+
that would otherwise be required to grant permissions to cluster-scoped
436+
resources.
432437
-->
433438
`parameters` 字段有一个 `scope``namespace` 字段,可用来引用特定
434439
于名字空间的资源,对 Ingress 类进行配置。
435440
`scope` 字段默认为 `Cluster`,表示默认是集群作用域的资源。
436441
`scope` 设置为 `Namespace` 并设置 `namespace` 字段就可以引用某特定
437442
名字空间中的参数资源。
438443

444+
有了名字空间域的参数,就不再需要为一个参数资源配置集群范围的 CustomResourceDefinition。
445+
除此之外,之前对访问集群范围的资源进行授权,需要用到 RBAC 相关的资源,现在也不再需要了。
446+
439447
{{< codenew file="service/networking/namespaced-params.yaml" >}}
440448

441449
<!--

content/zh/docs/concepts/services-networking/network-policies.md

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ Pod 的连接,*或* 来自任何名字空间中标有 `user=alice` 的任何 P
290290
<!--
291291
When in doubt, use `kubectl describe` to see how Kubernetes has interpreted the policy.
292292

293+
<a name="behavior-of-ipblock-selectors"></a>
293294
__ipBlock__: This selects particular IP CIDR ranges to allow as ingress sources or egress destinations. These should be cluster-external IPs, since Pod IPs are ephemeral and unpredictable.
294295

295296
Cluster ingress and egress mechanisms often require rewriting the source or destination IP
@@ -415,13 +416,13 @@ This ensures that even pods that aren't selected by any other NetworkPolicy will
415416
-->
416417
## SCTP 支持
417418

418-
{{< feature-state for_k8s_version="v1.19" state="beta" >}}
419+
{{< feature-state for_k8s_version="v1.20" state="stable" >}}
419420

420421
<!--
421-
As a beta feature, this is enabled by default. To disable SCTP at a cluster level, you (or your cluster administrator) will need to disable the `SCTPSupport` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) for the API server with `-feature-gates=SCTPSupport=false,...`.
422+
As a stable feature, this is enabled by default. To disable SCTP at a cluster level, you (or your cluster administrator) will need to disable the `SCTPSupport` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) for the API server with `--feature-gates=SCTPSupport=false,`.
422423
When the feature gate is enabled, you can set the `protocol` field of a NetworkPolicy to `SCTP`.
423424
-->
424-
作为一个 Beta 特性,SCTP 支持默认是被启用的。
425+
作为一个稳定特性,SCTP 支持默认是被启用的。
425426
要在集群层面禁用 SCTP,你(或你的集群管理员)需要为 API 服务器指定
426427
`--feature-gates=SCTPSupport=false,...`
427428
来禁用 `SCTPSupport` [特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)。
@@ -439,7 +440,7 @@ You must be using a {{< glossary_tooltip text="CNI" term_id="cni" >}} plugin tha
439440
-->
440441
## 针对某个端口范围 {#targeting-a-range-of-ports}
441442

442-
{{< feature-state for_k8s_version="v1.21" state="alpha" >}}
443+
{{< feature-state for_k8s_version="v1.22" state="beta" >}}
443444

444445
<!--
445446
When writing a NetworkPolicy, you can target a range of ports instead of a single port.
@@ -473,23 +474,25 @@ spec:
473474
```
474475

475476
<!--
476-
The above rule allows any Pod with label `db` on the namespace `default` to communicate with any IP within the range `10.0.0.0/24` over TCP, provided that the target port is between the range 32000 and 32768.
477+
The above rule allows any Pod with label `db` on the namespace `default` to communicate
478+
with any IP within the range `10.0.0.0/24` over TCP, provided that the target
479+
port is between the range 32000 and 32768.
477480
-->
478481
上面的规则允许名字空间 `default` 中所有带有标签 `db` 的 Pod 使用 TCP 协议
479482
与 `10.0.0.0/24` 范围内的 IP 通信,只要目标端口介于 32000 和 32768 之间就可以。
480483

481484
<!--
482485
The following restrictions apply when using this field:
483-
* As an alpha feature, this is disabled by default. To enable the `endPort` field at a cluster level, you (or your cluster administrator) need to enable the `NetworkPolicyEndPort` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) for the API server with `-feature-gates=NetworkPolicyEndPort=true,…`.
486+
* As a beta feature, this is enabled by default. To disable the `endPort` field at a cluster level, you (or your cluster administrator) need to disable the `NetworkPolicyEndPort` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) for the API server with `-feature-gates=NetworkPolicyEndPort=false,…`.
484487
* The `endPort` field must be equal than or greater to the `port` field.
485488
* `endPort` can only be defined if `port` is also defined.
486489
* Both ports must be numeric.
487490
-->
488491
使用此字段时存在以下限制:
489492

490-
* 作为一种 Alpha 阶段的特性,端口范围设定默认是被禁用的。要在整个集群
491-
范围内允许使用 `endPort` 字段,你(或者你的集群管理员)需要为 API
492-
服务器设置 `-feature-gates=NetworkPolicyEndPort=true,...` 以启用
493+
* 作为一种 Beta 阶段的特性,端口范围设定默认是被启用的。要在整个集群
494+
范围内禁止使用 `endPort` 字段,你(或者你的集群管理员)需要为 API
495+
服务器设置 `-feature-gates=NetworkPolicyEndPort=false,...` 以禁用
493496
`NetworkPolicyEndPort`
494497
[特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)。
495498
* `endPort` 字段必须等于或者大于 `port` 字段的值。
@@ -499,9 +502,15 @@ The following restrictions apply when using this field:
499502
<!--
500503
Your cluster must be using a {{< glossary_tooltip text="CNI" term_id="cni" >}} plugin that
501504
supports the `endPort` field in NetworkPolicy specifications.
505+
If your [network plugin](/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/)
506+
does not support the `endPort` field and you specify a NetworkPolicy with that,
507+
the policy will be applied only for the single `port` field.
502508
-->
503509
你的集群所使用的 {{< glossary_tooltip text="CNI" term_id="cni" >}} 插件
504510
必须支持在 NetworkPolicy 规约中使用 `endPort` 字段。
511+
如果你的[网络插件](/zh/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/)
512+
不支持 `endPort` 字段,而你指定了一个包含 `endPort` 字段的 NetworkPolicy,
513+
策略只对单个 `port` 字段生效。
505514
{{< /note >}}
506515

507516
<!--

0 commit comments

Comments
 (0)