Skip to content

Commit 60a91c9

Browse files
authored
Merge pull request #38091 from windsonsea/servtop
[zh] sync service-topology.md
2 parents 41f78e9 + 113a5d9 commit 60a91c9

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

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

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,12 @@ to endpoints within the same zone.
5252
By setting `topologyKeys` on a Service, you're able to define a policy for routing
5353
traffic based upon the Node labels for the originating and destination Nodes.
5454
-->
55-
## 拓扑感知的流量路由
55+
## 拓扑感知的流量路由 {#topology-aware-traffic-routing}
5656

57-
默认情况下,发往 `ClusterIP` 或者 `NodePort` 服务的流量可能会被路由到
58-
服务的任一后端的地址。Kubernetes 1.7 允许将“外部”流量路由到接收到流量的
59-
节点上的 Pod。对于 `ClusterIP` 服务,无法完成同节点优先的路由,你也无法
60-
配置集群优选路由到同一可用区中的端点。
61-
通过在 Service 上配置 `topologyKeys`,你可以基于来源节点和目标节点的
62-
标签来定义流量路由策略。
57+
默认情况下,发往 `ClusterIP` 或者 `NodePort` 服务的流量可能会被路由到服务的任一后端的地址。
58+
Kubernetes 1.7 允许将“外部”流量路由到接收到流量的节点上的 Pod。对于 `ClusterIP`
59+
服务,无法完成同节点优先的路由,你也无法配置集群优选路由到同一可用区中的端点。
60+
通过在 Service 上配置 `topologyKeys`,你可以基于来源节点和目标节点的标签来定义流量路由策略。
6361

6462
<!--
6563
The label matching between the source and destination lets you, as a cluster
@@ -76,8 +74,8 @@ same top-of-rack switch for the lowest latency.
7674
来定义节点集合。你可以基于符合自身需求的任何度量值来定义标签。
7775
例如,在公有云上,你可能更偏向于把流量控制在同一区内,因为区间流量是有费用成本的,
7876
而区内流量则没有。
79-
其它常见需求还包括把流量路由到由 `DaemonSet` 管理的本地 Pod 上,或者
80-
把将流量转发到连接在同一机架交换机的节点上,以获得低延时。
77+
其它常见需求还包括把流量路由到由 `DaemonSet` 管理的本地 Pod
78+
上,或者把将流量转发到连接在同一机架交换机的节点上,以获得低延时。
8179

8280
<!--
8381
## Using Service Topology
@@ -183,7 +181,7 @@ traffic as follows.
183181
184182
The following are common examples of using the Service Topology feature.
185183
-->
186-
## 示例
184+
## 示例 {#examples}
187185

188186
以下是使用服务拓扑功能的常见示例。
189187

@@ -192,7 +190,7 @@ The following are common examples of using the Service Topology feature.
192190
193191
A Service that only routes to node local endpoints. If no endpoints exist on the node, traffic is dropped:
194192
-->
195-
### 仅节点本地端点
193+
### 仅节点本地端点 {#only-node-local-endpoints}
196194

197195
仅路由到节点本地端点的一种服务。如果节点上不存在端点,流量则被丢弃:
198196

@@ -217,7 +215,7 @@ spec:
217215
218216
A Service that prefers node local Endpoints but falls back to cluster wide endpoints if node local endpoints do not exist:
219217
-->
220-
### 首选节点本地端点
218+
### 首选节点本地端点 {#prefer-node-local-endpoints}
221219
222220
首选节点本地端点,如果节点本地端点不存在,则回退到集群范围端点的一种服务:
223221
@@ -243,7 +241,7 @@ spec:
243241
244242
A Service that prefers zonal then regional endpoints. If no endpoints exist in either, traffic is dropped.
245243
-->
246-
### 仅地域或区域端点
244+
### 仅地域或区域端点 {#only-zonal-or-regional-endpoints}
247245
248246
首选地域端点而不是区域端点的一种服务。 如果以上两种范围内均不存在端点,
249247
流量则被丢弃。
@@ -270,10 +268,9 @@ spec:
270268
271269
A Service that prefers node local, zonal, then regional endpoints but falls back to cluster wide endpoints.
272270
-->
273-
### 优先选择节点本地端点、地域端点,然后是区域端点
271+
### 优先选择节点本地端点、地域端点,然后是区域端点 {#prefer-node-local-zonal-then-regional-endpoints}
274272
275-
优先选择节点本地端点,地域端点,然后是区域端点,最后才是集群范围端点的
276-
一种服务。
273+
优先选择节点本地端点,地域端点,然后是区域端点,最后才是集群范围端点的一种服务。
277274
278275
```yaml
279276
apiVersion: v1

0 commit comments

Comments
 (0)