Skip to content

Commit cd9dc4e

Browse files
author
EricWvi
committed
apply suggestion
1 parent d1a5020 commit cd9dc4e

File tree

4 files changed

+26
-18
lines changed

4 files changed

+26
-18
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -557,15 +557,15 @@ If the feature gate `ExpandedDNSConfig` is enabled for the kube-apiserver and
557557
the kubelet, it is allowed for Kubernetes to have at most 32 search domains and
558558
a list of search domains of up to 2048 characters.
559559
-->
560-
#### 扩展 DNS 配置
560+
#### 扩展 DNS 配置 {#expanded-dns-configuration}
561561

562562
{{< feature-state for_k8s_version="1.22" state="alpha" >}}
563563

564-
对于 Pod DNS 配置,Kubernetes 默认允许最多 6 个 search domain
565-
以及一个最多 256 个字符的 search domain 列表
564+
对于 Pod DNS 配置,Kubernetes 默认允许最多 6 个 搜索域( Search Domain)
565+
以及一个最多 256 个字符的搜索域列表
566566

567567
如果启用 kube-apiserver 和 kubelet 的特性门控 `ExpandedDNSConfig`,Kubernetes 将可以有最多 32 个
568-
search domain 以及一个最多 2048 个字符的 search domain 列表
568+
搜索域以及一个最多 2048 个字符的搜索域列表
569569

570570
<!--
571571
### Feature availability

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ resources.
441441
`scope` 设置为 `Namespace` 并设置 `namespace` 字段就可以引用某特定
442442
名字空间中的参数资源。
443443

444-
`scope` 设置为 `Namespace` 后不再需要为一个参数资源配置集群范围的 CustomResourceDefinition。
444+
有了名字空间域的参数,就不再需要为一个参数资源配置集群范围的 CustomResourceDefinition。
445445
除此之外,之前对访问集群范围的资源进行授权,需要用到 RBAC 相关的资源,现在也不再需要了。
446446

447447
{{< codenew file="service/networking/namespaced-params.yaml" >}}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ This ensures that even pods that aren't selected by any other NetworkPolicy will
422422
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,…`.
423423
When the feature gate is enabled, you can set the `protocol` field of a NetworkPolicy to `SCTP`.
424424
-->
425-
作为一个 Stable 特性,SCTP 支持默认是被启用的。
425+
作为一个稳定特性,SCTP 支持默认是被启用的。
426426
要在集群层面禁用 SCTP,你(或你的集群管理员)需要为 API 服务器指定
427427
`--feature-gates=SCTPSupport=false,...`
428428
来禁用 `SCTPSupport` [特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)。
@@ -508,8 +508,8 @@ the policy will be applied only for the single `port` field.
508508
-->
509509
你的集群所使用的 {{< glossary_tooltip text="CNI" term_id="cni" >}} 插件
510510
必须支持在 NetworkPolicy 规约中使用 `endPort` 字段。
511-
如果你的 [网络插件](/zh/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/)
512-
不支持 `endPort` 字段的情况下,你指定一个有 `endPort` 字段的网络策略
511+
如果你的[网络插件](/zh/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/)
512+
不支持 `endPort` 字段,而你指定了一个包含 `endPort` 字段的 NetworkPolicy
513513
策略只对单个 `port` 字段生效。
514514
{{< /note >}}
515515

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

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ the endpoints controller has truncated the number of endpoints to 1000.
325325
如果某个 Endpoints 资源中包含的端点个数超过 1000,则 Kubernetes v1.22 版本
326326
(及更新版本)的集群会将为该 Endpoints 添加注解
327327
`endpoints.kubernetes.io/over-capacity: truncated`。
328-
这一注解表明所影响到的 Endpoints 对象已经超出容量,此外 Endpoints Controller 还会将 Endpoints 对象数量截断到 1000。
328+
这一注解表明所影响到的 Endpoints 对象已经超出容量,此外 Endpoints 控制器还会将 Endpoints 对象数量截断到 1000。
329329

330330
<!--
331331
### EndpointSlices
@@ -664,12 +664,12 @@ server will return a 422 HTTP status code to indicate that there's a problem.
664664
<!--
665665
## Traffic policies
666666
-->
667-
## 流量策略
667+
## 流量策略 {#traffic-policies}
668668

669669
<!--
670670
### External traffic policy
671671
-->
672-
### 外部流量策略
672+
### 外部流量策略 {#external-traffic-policy}
673673

674674
<!--
675675
You can set the `spec.externalTrafficPolicy` field to control how traffic from external sources is routed.
@@ -680,7 +680,8 @@ endpoints, the kube-proxy does not forward any traffic for the relevant Service.
680680

681681
你可以通过设置 `spec.externalTrafficPolicy` 字段来控制来自于外部的流量是如何路由的。
682682
可选值有 `Cluster` 和 `Local`。字段设为 `Cluster` 会将外部流量路由到所有就绪的端点,
683-
设为 `Local` 会只路由到当前节点上就绪的端点。如果流量策略设置为 `Local`,而且当前节点上没有就绪的端点,kube-proxy 不会转发请求相关服务的任何流量。
683+
设为 `Local` 会只路由到当前节点上就绪的端点。
684+
如果流量策略设置为 `Local`,而且当前节点上没有就绪的端点,kube-proxy 不会转发请求相关服务的任何流量。
684685

685686
{{< note >}}
686687
{{< feature-state for_k8s_version="v1.22" state="alpha" >}}
@@ -692,7 +693,9 @@ If you enable the `ProxyTerminatingEndpoints`
692693
has local endpoints and whether or not all the local endpoints are marked as terminating.
693694
-->
694695

695-
如果你启用了 kube-proxy 的 `ProxyTerminatingEndpoints` [特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/),kube-proxy 会检查节点是否有本地的端点,以及是否所有的本地端点都被标记为终止中。
696+
如果你启用了 kube-proxy 的 `ProxyTerminatingEndpoints`
697+
[特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/),
698+
kube-proxy 会检查节点是否有本地的端点,以及是否所有的本地端点都被标记为终止中。
696699

697700
<!--
698701
If there are local endpoints and **all** of those are terminating, then the kube-proxy ignores
@@ -701,23 +704,26 @@ terminating, the kube-proxy forwards traffic for that Service to healthy endpoin
701704
as if the external traffic policy were set to `Cluster`.
702705
-->
703706

704-
如果本地有端点,而且所有端点处于终止中的状态,那么 kube-proxy 会忽略任何设为 `Local` 的外部流量策略。在所有本地端点处于终止中的状态的同时,kube-proxy 将请求指定服务的流量转发到位于其它节点的状态健康的端点,如同外部流量策略设为 `Cluster`。
707+
如果本地有端点,而且所有端点处于终止中的状态,那么 kube-proxy 会忽略任何设为 `Local` 的外部流量策略。
708+
在所有本地端点处于终止中的状态的同时,kube-proxy 将请求指定服务的流量转发到位于其它节点的
709+
状态健康的端点,如同外部流量策略设为 `Cluster`。
705710

706711
<!--
707712
This forwarding behavior for terminating endpoints exists to allow external load balancers to
708713
gracefully drain connections that are backed by `NodePort` Services, even when the health check
709714
node port starts to fail. Otherwise, traffic can be lost between the time a node is still in the node pool of a load
710715
balancer and traffic is being dropped during the termination period of a pod.
711716
-->
712-
在端点都处于终止中的情况下,这个转发行为使得外部的负载均衡器可以优雅地排出由 `NodePort` 服务支持的连接,就算是健康检查节点端口开始失败也是如此。
713-
否则,在节点还在负载均衡器的节点池中,到一个 Pod 终止过程中正在丢弃流量之间,流量可能会丢失。
717+
针对处于正被终止状态的端点这一转发行为使得外部负载均衡器可以优雅地排出由
718+
`NodePort` 服务支持的连接,就算是健康检查节点端口开始失败也是如此。
719+
否则,当节点还在负载均衡器的节点池内,在 Pod 终止过程中的流量会被丢掉,这些流量可能会丢失。
714720

715721
{{< /note >}}
716722

717723
<!--
718724
### Internal traffic policy
719725
-->
720-
### 内部流量策略
726+
### 内部流量策略 {#internal-traffic-policy}
721727

722728
{{< feature-state for_k8s_version="v1.22" state="beta" >}}
723729

@@ -1209,7 +1215,9 @@ the cloud provider) will ignore Services that have this field set.
12091215
`spec.loadBalancerClass` can be set on a Service of type `LoadBalancer` only.
12101216
Once set, it cannot be changed.
12111217
-->
1212-
`spec.loadBalancerClass` 允许你不使用云提供商的默认负载均衡器实现,转而使用指定的负载均衡器实现。这个特性从 v1.21 版本开始可以使用,你在 v1.21 版本中使用这个字段必须启用 `ServiceLoadBalancerClass` 特性门控,这个特性门控从 v1.22 版本及以后默认打开。
1218+
`spec.loadBalancerClass` 允许你不使用云提供商的默认负载均衡器实现,转而使用指定的负载均衡器实现。
1219+
这个特性从 v1.21 版本开始可以使用,你在 v1.21 版本中使用这个字段必须启用 `ServiceLoadBalancerClass`
1220+
特性门控,这个特性门控从 v1.22 版本及以后默认打开。
12131221
默认情况下,`.spec.loadBalancerClass` 的取值是 `nil`,如果集群使用 `--cloud-provider` 配置了云提供商,
12141222
`LoadBalancer` 类型服务会使用云提供商的默认负载均衡器实现。
12151223
如果设置了 `.spec.loadBalancerClass`,则假定存在某个与所指定的类相匹配的

0 commit comments

Comments
 (0)