@@ -3,37 +3,42 @@ title: 开启服务拓扑
3
3
content_type : task
4
4
min-kubernetes-server-version : 1.17
5
5
---
6
+ <!--
7
+ reviewers:
8
+ - andrewsykim
9
+ - johnbelamaric
10
+ - imroc
11
+ title: Enabling Service Topology
12
+ content_type: task
13
+ min-kubernetes-server-version: 1.17
14
+ -->
6
15
7
16
<!-- overview -->
8
17
{{< feature-state for_k8s_version="v1.21" state="deprecated" >}}
18
+
9
19
<!--
10
20
This feature, specifically the alpha `topologyKeys` field, is deprecated since
11
21
Kubernetes v1.21.
12
22
[Topology Aware Hints](/docs/concepts/services-networking/topology-aware-hints/),
13
23
introduced in Kubernetes v1.21, provide similar functionality.
14
24
-->
15
- 这项功能,特别是 Alpha 状态的 ` topologyKeys ` 字段,在 kubernetes v1.21 中已经弃用。
16
- 在 kubernetes v1.21 加入的[ 拓扑感知提示] ( /zh-cn/docs/concepts/services-networking/topology-aware-hints/ )
17
- 提供了类似的功能。
18
-
19
- ## {{% heading "prerequisites" %}}
20
-
21
- {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
25
+ 这项功能,特别是 Alpha 状态的 ` topologyKeys ` 字段,在 Kubernetes v1.21 中已经弃用。
26
+ 在 Kubernetes v1.21
27
+ 加入的[ 拓扑感知提示] ( /zh-cn/docs/concepts/services-networking/topology-aware-hints/ ) 提供了类似的功能。
22
28
23
29
<!--
24
30
_Service Topology_ enables a {{< glossary_tooltip term_id="service">}} to route traffic based upon the Node
25
31
topology of the cluster. For example, a service can specify that traffic be
26
32
preferentially routed to endpoints that are on the same Node as the client, or
27
33
in the same availability zone.
28
34
-->
29
-
30
- _ 服务拓扑(Service Topology)_ 使 {{< glossary_tooltip term_id="service" text="服务">}}
35
+ ** 服务拓扑(Service Topology)** 使 {{< glossary_tooltip term_id="service">}}
31
36
能够根据集群中的 Node 拓扑来路由流量。
32
37
比如,服务可以指定将流量优先路由到与客户端位于同一节点或者同一可用区域的端点上。
33
38
34
39
## {{% heading "prerequisites" %}}
35
40
36
- {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
41
+ {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
37
42
38
43
<!--
39
44
The following prerequisites are needed in order to enable topology aware service
@@ -42,42 +47,40 @@ routing:
42
47
* Kubernetes v1.17 or later
43
48
* Configure {{< glossary_tooltip text="kube-proxy" term_id="kube-proxy" >}} to run in iptables mode or IPVS mode
44
49
-->
45
- 需要下面列的先决条件,才能启用拓扑感知的服务路由:
50
+ 需要满足下列先决条件,才能启用拓扑感知的服务路由:
51
+
52
+ * Kubernetes 1.17 或更高版本
53
+ * 配置 {{< glossary_tooltip text="kube-proxy" term_id="kube-proxy" >}} 以 iptables 或者 IPVS 模式运行
46
54
47
- * Kubernetes 1.17 或更新版本
48
- * 配置 {{< glossary_tooltip text="kube-proxy" term_id="kube-proxy" >}} 以 iptables 或者 IPVS 模式运行
49
55
<!-- steps -->
50
56
51
57
<!--
52
58
## Enable Service Topology
59
+ -->
60
+ ## 启用服务拓扑 {#enable-service-topology}
53
61
54
62
{{< feature-state for_k8s_version="v1.21" state="deprecated" >}}
55
63
64
+ <!--
56
65
To enable service topology, enable the `ServiceTopology`
57
66
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/) for all Kubernetes components:
58
67
-->
59
- ## 启用服务拓扑
60
-
61
- {{< feature-state for_k8s_version="v1.21" state="deprecated" >}}
62
-
63
- 要启用服务拓扑功能,需要为所有 Kubernetes 组件启用 ` ServiceTopology `
68
+ 要启用服务拓扑,需要为所有 Kubernetes 组件启用 ` ServiceTopology `
64
69
[ 特性门控] ( /zh-cn/docs/reference/command-line-tools-reference/feature-gates/ ) :
65
70
66
71
```
67
72
--feature-gates="ServiceTopology=true`
68
73
```
69
74
70
-
71
75
## {{% heading "whatsnext" %}}
72
76
73
77
<!--
74
78
* Read about [Topology Aware Hints](/docs/concepts/services-networking/topology-aware-hints/), the replacement for the `topologyKeys` field.
75
79
* Read about [EndpointSlices](/docs/concepts/services-networking/endpoint-slices/)
76
80
* Read about the [Service Topology](/docs/concepts/services-networking/service-topology/) concept
77
- * Read [Connecting Applications with Services](/docs/concepts /services-networking /connect-applications-service/)
81
+ * Read [Connecting Applications with Services](/docs/tutorials /services/connect-applications-service/)
78
82
-->
79
-
80
83
* 阅读[ 拓扑感知提示] ( /zh-cn/docs/concepts/services-networking/topology-aware-hints/ ) ,该技术是用来替换 ` topologyKeys ` 字段的。
81
84
* 阅读[ 端点切片] ( /zh-cn/docs/concepts/services-networking/endpoint-slices )
82
85
* 阅读[ 服务拓扑] ( /zh-cn/docs/concepts/services-networking/service-topology ) 概念
83
- * 阅读[ 通过服务来连接应用 ] ( /zh-cn/docs/concepts /services-networking /connect-applications-service/ )
86
+ * 阅读[ 使用 Service 连接到应用 ] ( /zh-cn/docs/tutorials /services/connect-applications-service/ )
0 commit comments