Skip to content

Commit 8cffdd9

Browse files
authored
Merge pull request #25132 from tengqm/zh-sync-enabling-endpointslice
[zh] Sync tasks/administer-cluster/enabling-endpointslices.md
2 parents cbe169e + 0fb07f7 commit 8cffdd9

File tree

1 file changed

+76
-56
lines changed

1 file changed

+76
-56
lines changed

content/zh/docs/tasks/administer-cluster/enabling-endpointslices.md

Lines changed: 76 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,110 +1,130 @@
11
---
22
reviewers:
3-
- bowei
4-
- freehan
5-
title: 启用端点切片
3+
title: 启用 EndpointSlices
64
content_type: task
75
---
86

97
<!--
10-
---
118
reviewers:
129
- bowei
1310
- freehan
14-
title: Enabling Endpoint Slices
11+
title: Enabling EndpointSlices
1512
content_type: task
16-
---
1713
-->
1814

1915
<!-- overview -->
2016

2117
<!--
22-
This page provides an overview of enabling Endpoint Slices in Kubernetes.
18+
This page provides an overview of enabling EndpointSlices in Kubernetes.
2319
-->
24-
本页提供启用 Kubernetes 端点切片的总览
25-
26-
27-
20+
本页提供启用 Kubernetes EndpointSlice 的总览。
2821

2922
## {{% heading "prerequisites" %}}
3023

31-
32-
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
33-
34-
35-
24+
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
3625

3726
<!-- steps -->
3827

3928
<!--
4029
## Introduction
4130
42-
Endpoint Slices provide a scalable and extensible alternative to Endpoints in
31+
EndpointSlices provide a scalable and extensible alternative to Endpoints in
4332
Kubernetes. They build on top of the base of functionality provided by Endpoints
4433
and extend that in a scalable way. When Services have a large number (>100) of
45-
network endpoints, they will be split into multiple smaller Endpoint Slice
34+
network endpoints, they will be split into multiple smaller EndpointSlice
4635
resources instead of a single large Endpoints resource.
4736
-->
4837
## 介绍
4938

50-
端点切片为 Kubernetes 端点提供了可伸缩和可扩展的替代方案。它们建立在端点提供的功能基础之上,并以可伸缩的方式进行扩展。当服务具有大量(>100)网络端点,
51-
它们将被分成多个较小的端点切片资源,而不是单个大型端点资源。
39+
EndpointSlice (端点切片)为 Kubernetes Endpoints 提供了可伸缩和可扩展的替代方案。
40+
它们建立在 Endpoints 提供的功能基础之上,并以可伸缩的方式进行扩展。
41+
当 Service 具有大量(>100)网络端点时,它们将被分成多个较小的 EndpointSlice 资源,
42+
而不是单个大型 Endpoints 资源。
5243

5344
<!--
54-
## Enabling Endpoint Slices
45+
## Enabling EndpointSlices
5546
-->
56-
## 启用端点切片
57-
{{< feature-state for_k8s_version="v1.16" state="alpha" >}}
47+
## 启用 EndpointSlice
5848

49+
{{< feature-state for_k8s_version="v1.17" state="beta" >}}
5950

6051
{{< note >}}
6152
<!--
62-
Although Endpoint Slices may eventually replace Endpoints, many Kubernetes
63-
components still rely on Endpoints. For now, enabling Endpoint Slices should be
53+
Although EndpointSlices may eventually replace Endpoints, many Kubernetes
54+
components still rely on Endpoints. For now, enabling EndpointSlices should be
6455
seen as an addition to Endpoints in a cluster, not a replacement for them.
6556
-->
66-
67-
尽管端点切片最终可能会取代端点,但许多 Kubernetes 组件仍然依赖于端点。目前,启用端点切片应该被视为集群中端点的补充,而不是它们的替代。
68-
57+
尽管 EndpointSlice 最终可能会取代 Endpoints,但许多 Kubernetes 组件仍然依赖于
58+
Endpoints。目前,启用 EndpointSlice 应该被视为集群中 Endpoints 的补充,而不是
59+
替代它们。
6960
{{< /note >}}
7061

7162
<!--
72-
As an alpha feature, Endpoint Slices are not enabled by default in Kubernetes.
73-
Enabling Endpoint Slices requires as many as 3 changes to Kubernetes cluster
74-
configuration.
75-
76-
To enable the Discovery API group that includes Endpoint Slices, use the runtime
77-
config flag (`--runtime-config=discovery.k8s.io/v1alpha1=true`).
78-
79-
The logic responsible for watching services, pods, and nodes and creating or
80-
updating associated Endpoint Slices lives within the EndpointSlice controller.
81-
This is disabled by default but can be enabled with the controllers flag on
82-
kube-controller-manager (`--controllers=endpointslice`).
83-
84-
For Kubernetes components like kube-proxy to actually start using Endpoint
85-
Slices, the EndpointSlice feature gate will need to be enabled
86-
(`--feature-gates=EndpointSlice=true`).
63+
EndpointSlice functionality in Kubernetes is made up of several different
64+
components, most are enabled by default:
8765
-->
66+
Kubernetes 中的 EndpointSlice 功能包含若干不同组件。它们中的大部分都是
67+
默认被启用的:
8868

89-
作为 Alpha 功能,默认情况下,Kubernetes 中未启用端点切片。启用端点切片需要对 Kubernetes 集群进行多达 3 项配置修改。
90-
91-
要启用包括端点切片的 Discovery API 组,请使用运行时配置标志(`--runtime-config=discovery.k8s.io/v1alpha1=true`)。
92-
93-
该逻辑负责监视服务,pod 和节点以及创建或更新与之关联,在端点切片控制器内的端点切片。
94-
默认情况下,此功能处于禁用状态,但可以通过启用在 kube-controller-manager 控制器的标志(`--controllers=endpointslice`)来开启。
69+
<!--
70+
* _The EndpointSlice API_: EndpointSlices are part of the
71+
`discovery.k8s.io/v1beta1` API. This is beta and enabled by default since
72+
Kubernetes 1.17. All components listed below are dependent on this API being
73+
enabled.
74+
* _The EndpointSlice Controller_: This {{< glossary_tooltip text="controller"
75+
term_id="controller" >}} maintains EndpointSlices for Services and the Pods
76+
they reference. This is controlled by the `EndpointSlice` feature gate. It has
77+
been enabled by default since Kubernetes 1.18.
78+
-->
79+
* _EndpointSlice API_:EndpointSlice 隶属于 `discovery.k8s.io/v1beta1` API。
80+
此 API 处于 Beta 阶段,从 Kubernetes 1.17 开始默认被启用。
81+
下面列举的所有组件都依赖于此 API 被启用。
82+
* _EndpointSlice 控制器_:此 {{< glossary_tooltip text="控制器" term_id="controller" >}}
83+
为 Service 维护 EndpointSlice 及其引用的 Pods。
84+
此控制器通过 `EndpointSlice` 特性门控控制。自从 Kubernetes 1.18 起,
85+
该特性门控默认被启用。
9586

96-
对于像 kube-proxy 这样的 Kubernetes 组件真正开始使用端点切片,需要开启端点切片功能标志(`--feature-gates=EndpointSlice=true`)。
87+
<!--
88+
* _The EndpointSliceMirroring Controller_: This {{< glossary_tooltip
89+
text="controller" term_id="controller" >}} mirrors custom Endpoints to
90+
EndpointSlices. This is controlled by the `EndpointSlice` feature gate. It has
91+
been enabled by default since Kubernetes 1.19.
92+
* _Kube-Proxy_: When {{< glossary_tooltip text="kube-proxy" term_id="kube-proxy">}}
93+
is configured to use EndpointSlices, it can support higher numbers of Service
94+
endpoints. This is controlled by the `EndpointSliceProxying` feature gate on
95+
Linux and `WindowsEndpointSliceProxying` on Windows. It has been enabled by
96+
default on Linux since Kubernetes 1.19. It is not enabled by default for
97+
Windows nodes. To configure kube-proxy to use EndpointSlices on Windows, you
98+
can enable the `WindowsEndpointSliceProxying` [feature
99+
gate](/docs/reference/command-line-tools-reference/feature-gates/) on
100+
kube-proxy.
101+
-->
102+
* _EndpointSliceMirroring 控制器_:此 {{< glossary_tooltip text="控制器" term_id="controller" >}}
103+
将自定义的 Endpoints 映射为 EndpointSlice。
104+
控制器受 `EndpointSlice` 特性门控控制。该特性门控自 1.19 开始被默认启用。
105+
* _kube-proxy_:当 {{< glossary_tooltip text="kube-proxy" term_id="kube-proxy">}}
106+
被配置为使用 EndpointSlice 时,它会支持更大数量的 Service 端点。
107+
此功能在 Linux 上受 `EndpointSliceProxying` 特性门控控制;在 Windows 上受
108+
`WindowsEndpointSliceProxying` 特性门控控制。
109+
在 Linux 上,从 Kubernetes 1.19 版本起自动启用。目前尚未在 Windows 节点
110+
上默认启用。
111+
要在 Windows 节点上配置 kube-proxy 使用 EndpointSlice,你需要为 kube-proxy 启用
112+
`WindowsEndpointSliceProxying`
113+
[特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)
97114

98115
<!--
99116
## Using Endpoint Slices
100117
101-
With Endpoint Slices fully enabled in your cluster, you should see corresponding
118+
With EndpointSlices fully enabled in your cluster, you should see corresponding
102119
EndpointSlice resources for each Endpoints resource. In addition to supporting
103-
existing Endpoints functionality, Endpoint Slices should include new bits of
104-
information such as topology. They will allow for greater scalability and
105-
extensibility of network endpoints in your cluster.
120+
existing Endpoints functionality, EndpointSlices include new bits of information
121+
such as topology. They will allow for greater scalability and extensibility of
122+
network endpoints in your cluster.
106123
-->
124+
## 使用 EndpointSlice
107125

108-
## 使用端点切片
126+
在集群中完全启用 EndpointSlice 的情况下,你应该看到对应于每个
127+
Endpoints 资源的 EndpointSlice 资源。除了支持现有的 Endpoints 功能外,
128+
EndpointSlice 还引入了拓扑结构等新的信息。它们将使集群中网络端点具有更强的
129+
可伸缩性和可扩展性。
109130

110-
在集群中完全启用端点切片的情况下,您应该看到对应的每个端点资源的端点切片资源。除了兼容现有的端点功能,端点切片应包括拓扑等新的信息。它们将使集群中网络端点具有更强的可伸缩性,可扩展性。

0 commit comments

Comments
 (0)