Skip to content

Commit 1d04396

Browse files
committed
[zh-cn]sync endpoints-v1
Signed-off-by: xin.li <xin.li@daocloud.io>
1 parent d08777d commit 1d04396

File tree

1 file changed

+59
-42
lines changed
  • content/zh-cn/docs/reference/kubernetes-api/service-resources

1 file changed

+59
-42
lines changed

content/zh-cn/docs/reference/kubernetes-api/service-resources/endpoints-v1.md

Lines changed: 59 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,19 @@ Endpoints is a collection of endpoints that implement the actual service. Exampl
3131
-->
3232
Endpoints 是实现实际 Service 的端点的集合。举例:
3333

34-
Name: "mysvc",
35-
Subsets: [
36-
{
37-
Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}],
38-
Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}]
39-
},
40-
{
41-
Addresses: [{"ip": "10.10.3.3"}],
42-
Ports: [{"name": "a", "port": 93}, {"name": "b", "port": 76}]
43-
},
44-
]
34+
```
35+
Name: "mysvc",
36+
Subsets: [
37+
{
38+
Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}],
39+
Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}]
40+
},
41+
{
42+
Addresses: [{"ip": "10.10.3.3"}],
43+
Ports: [{"name": "a", "port": 93}, {"name": "b", "port": 76}]
44+
},
45+
]
46+
```
4547

4648
<hr>
4749

@@ -50,10 +52,10 @@ Endpoints is a legacy API and does not contain information about all Service fea
5052
5153
Deprecated: This API is deprecated in v1.33+. Use discoveryv1.EndpointSlice.
5254
-->
53-
Endpoints 是遗留 API,不包含所有 Service 特性的信息。使用 discoveryv1.EndpointSlice
55+
Endpoints 是遗留 API,不包含所有 Service 特性的信息。使用 `discoveryv1.EndpointSlice`
5456
获取关于 Service 端点的完整信息。
5557

56-
已弃用:此 API 在 v1.33+ 中已被弃用。请使用 discoveryv1.EndpointSlice。
58+
已弃用:此 API 在 v1.33+ 中已被弃用。请使用 `discoveryv1.EndpointSlice`
5759

5860
- **apiVersion**: v1
5961

@@ -75,32 +77,37 @@ Endpoints 是遗留 API,不包含所有 Service 特性的信息。使用 disco
7577
The set of all endpoints is the union of all subsets. Addresses are placed into subsets according to the IPs they share. A single address with multiple ports, some of which are ready and some of which are not (because they come from different containers) will result in the address being displayed in different subsets for the different ports. No address will appear in both Addresses and NotReadyAddresses in the same subset. Sets of addresses and ports that comprise a service.
7678
-->
7779

78-
**Atomic:将在合并期间被替换**
80+
**原子性:将在合并期间被替换**
7981

80-
所有端点的集合是所有 subsets 的并集。不同地址会根据其 IP 地址被放入不同子集。
82+
所有端点的集合是所有 `subsets` 的并集。不同地址会根据其 IP 地址被放入不同子集。
8183
对于具有多个端口的单个地址,如果其中一些端口已就绪,而另一些端口未就绪(因为它们来自不同的容器),
8284
将导致地址显示在不同端口的不同子集中。
83-
任何地址都不可以同时出现在 addresses 和 notReadyAddress 中的相同子集内。
85+
任何地址都不可以同时出现在 `addresses``notReadyAddress` 中的相同子集内。
8486

8587
<!--
8688
<a name="EndpointSubset"></a>
8789
*EndpointSubset is a group of addresses with a common set of ports. The expanded set of endpoints is the Cartesian product of Addresses x Ports. For example, given:
8890
-->
8991
<a name="EndpointSubset"></a>
90-
**EndpointSubset 是一组具有公共端口集的地址。扩展的端点集是 addresses 和 ports 的笛卡尔乘积。例如假设:**
92+
**EndpointSubset 是一组具有公共端口集的地址。扩展的端点集是 `addresses``ports`
93+
的笛卡尔乘积。例如假设:**
9194

92-
{
93-
Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}],
94-
Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}]
95-
}
95+
```
96+
{
97+
Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}],
98+
Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}]
99+
}
100+
```
96101
97102
<!--
98103
The resulting set of endpoints can be viewed as:
99104
-->
100105
则最终的端点集可以看作:
101106
102-
a: [ 10.10.1.1:8675, 10.10.2.2:8675 ],
103-
b: [ 10.10.1.1:309, 10.10.2.2:309 ]
107+
```
108+
a: [ 10.10.1.1:8675, 10.10.2.2:8675 ],
109+
b: [ 10.10.1.1:309, 10.10.2.2:309 ]
110+
```
104111
105112
<!--
106113
Deprecated: This API is deprecated in v1.33+.*
@@ -137,9 +144,9 @@ Endpoints 是遗留 API,不包含所有 Service 特性的信息。使用 disco
137144
138145
- **subsets.addresses.ip** (string),必需
139146
140-
端点的 IP。不可以是本地回路(127.0.0.0/8 或 ::1)、
141-
链路本地(169.254.0.0/16 或 fe80::/10)或链路本地多播(224.0.0.0/24
142-
或 ff02::/16))地址。
147+
端点的 IP。不可以是本地回路(`127.0.0.0/8``::1`)、
148+
链路本地(`169.254.0.0/16``fe80::/10`)或链路本地多播(`224.0.0.0/24`
149+
`ff02::/16`))地址。
143150
144151
- **subsets.addresses.hostname** (string)
145152
@@ -190,9 +197,9 @@ Endpoints 是遗留 API,不包含所有 Service 特性的信息。使用 disco
190197
191198
- **subsets.notReadyAddresses.ip** (string),必需
192199
193-
端点的 IP。不可以是本地环路(127.0.0.0/8 或 ::1)、
194-
链路本地(169.254.0.0/16 或 fe80::/10)或链路本地多播(224.0.0.0/24
195-
或 ff02::/16)地址。
200+
端点的 IP。不可以是本地环路(`127.0.0.0/8``::1`)、
201+
链路本地(`169.254.0.0/16``fe80::/10`)或链路本地多播(`224.0.0.0/24`
202+
`ff02::/16`)地址。
196203
197204
- **subsets.notReadyAddresses.hostname** (string)
198205
@@ -252,12 +259,22 @@ Endpoints 是遗留 API,不包含所有 Service 特性的信息。使用 disco
252259
253260
<!--
254261
The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.
262+
263+
Possible enum values:
264+
- `"SCTP"` is the SCTP protocol.
265+
- `"TCP"` is the TCP protocol.
266+
- `"UDP"` is the UDP protocol.
255267
-->
256268
257269
此端口的 IP 协议。必须是 UDP、TCP 或 SCTP。默认值为 TCP。
258-
270+
271+
可能的枚举值:
272+
- `"SCTP"` 是 SCTP 协议
273+
- `"TCP"` 是 TCP 协议
274+
- `"UDP"` 是 UDP 协议
275+
259276
- **subsets.ports.name** (string)
260-
277+
261278
<!--
262279
The name of this port. This must match the 'name' field in the corresponding ServicePort. Must be a DNS_LABEL. Optional only if one port is defined.
263280
-->
@@ -266,7 +283,7 @@ Endpoints 是遗留 API,不包含所有 Service 特性的信息。使用 disco
266283
仅当定义了一个端口时才可选。
267284
268285
- **subsets.ports.appProtocol** (string)
269-
286+
270287
<!--
271288
The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either:
272289
-->
@@ -276,24 +293,24 @@ Endpoints 是遗留 API,不包含所有 Service 特性的信息。使用 disco
276293
277294
<!--
278295
* Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names).
279-
296+
280297
* Kubernetes-defined prefixed names:
281298
* 'kubernetes.io/h2c' - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540
282299
* 'kubernetes.io/h2c' - HTTP/2 prior knowledge over cleartext as described in https://www.rfc-editor.org/rfc/rfc9113.html#name-starting-http-2-with-prior-
283300
* 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455
284301
* 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455
285-
302+
286303
* Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol.
287304
-->
288-
305+
289306
* 未加前缀的名称保留给 IANA 标准服务名称(遵循 RFC-6335 和 https://www.iana.org/assignments/service-names)。
290-
307+
291308
* Kubernetes 定义的前缀名称
292309
* 'kubernetes.io/h2c' - HTTP/2 明文,如 https://www.rfc-editor.org/rfc/rfc7540 中所述
293310
* HTTP/2 通过明文预先了解知识,如 https://www.rfc-editor.org/rfc/rfc9113.html#name-starting-http-2-with-prior- 中所述
294311
* 'kubernetes.io/ws' - WebSocket 明文,如 https://www.rfc-editor.org/rfc/rfc6455 中所述
295312
* 'kubernetes.io/wss' - WebSocket TLS 传输方式,如 https://www.rfc-editor.org/rfc/rfc6455 中所述
296-
313+
297314
* 其他协议应使用实现定义的前缀名称,如 mycompany.com/my-custom-protocol。
298315
299316
## EndpointsList {#EndpointsList}
@@ -327,7 +344,7 @@ EndpointsList 是端点列表。已弃用:此 API 在 v1.33+ 中已被弃用
327344
-->
328345
- **items** ([]<a href="{{< ref "../service-resources/endpoints-v1#Endpoints" >}}">Endpoints</a>),必需
329346
330-
端点列表。
347+
端点列表。
331348
332349
## 操作 {#Operations}
333350
@@ -710,11 +727,11 @@ PUT /api/v1/namespaces/{namespace}/endpoints/{name}
710727
711728
<!--
712729
- **name** (*in path*): string, required
713-
730+
714731
name of the Endpoints
715732
-->
716733
- **name** (**路径参数**):string,必需
717-
734+
718735
Endpoints 名称
719736
720737
<!--
@@ -795,7 +812,7 @@ PATCH /api/v1/namespaces/{namespace}/endpoints/{name}
795812
-->
796813
- **name** (**路径参数**):string,必需
797814
798-
Endpoints 名称
815+
Endpoints 名称
799816
800817
<!--
801818
- **namespace** (*in path*): string, required
@@ -986,7 +1003,7 @@ DELETE /api/v1/namespaces/{namespace}/endpoints
9861003
<a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace</a>
9871004
9881005
- **body**: <a href="{{< ref "../common-definitions/delete-options#DeleteOptions" >}}">DeleteOptions</a>
989-
1006+
9901007
<!--
9911008
- **continue** (*in query*): string
9921009

0 commit comments

Comments
 (0)