Skip to content

Commit 2b51c01

Browse files
authored
Merge pull request #36778 from Michelle951/michelle003
[zh] sync endpoints-v1.md
2 parents 0b99c6a + 10e1e17 commit 2b51c01

File tree

1 file changed

+22
-41
lines changed
  • content/zh-cn/docs/reference/kubernetes-api/service-resources

1 file changed

+22
-41
lines changed

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

Lines changed: 22 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -28,33 +28,20 @@ auto_generated: true
2828

2929
<!--
3030
Endpoints is a collection of endpoints that implement the actual service. Example:
31-
Name: "mysvc",
32-
Subsets: [
33-
{
34-
Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}],
35-
Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}]
36-
},
37-
{
38-
Addresses: [{"ip": "10.10.3.3"}],
39-
Ports: [{"name": "a", "port": 93}, {"name": "b", "port": 76}]
40-
},
41-
]
4231
-->
4332
Endpoints 是实现实际服务的端点的集合。举例:
4433

45-
```
46-
Name: "mysvc",
47-
Subsets: [
48-
{
49-
Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}],
50-
Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}]
51-
},
52-
{
53-
Addresses: [{"ip": "10.10.3.3"}],
54-
Ports: [{"name": "a", "port": 93}, {"name": "b", "port": 76}]
55-
},
56-
]
57-
```
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+
]
5845

5946
<hr>
6047

@@ -83,30 +70,24 @@ Subsets: [
8370
<!--
8471
<a name="EndpointSubset"></a>
8572
*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:
86-
{
87-
Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}],
88-
Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}]
89-
}
90-
The resulting set of endpoints can be viewed as:
91-
a: [ 10.10.1.1:8675, 10.10.2.2:8675 ],
92-
b: [ 10.10.1.1:309, 10.10.2.2:309 ]*
9373
-->
9474
<a name="EndpointSubset"></a>
9575
**EndpointSubset 是一组具有公共端口集的地址。扩展的端点集是 addresses 和 ports 的笛卡尔乘积。例如假设:**
9676

97-
```
98-
{
99-
Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}],
100-
Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}]
101-
}
102-
```
77+
{
78+
Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}],
79+
Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}]
80+
}
10381

82+
<!--
83+
The resulting set of endpoints can be viewed as:
84+
-->
10485
则最终的端点集可以看作:
10586

106-
```
107-
a: [ 10.10.1.1:8675, 10.10.2.2:8675 ],
108-
b: [ 10.10.1.1:309, 10.10.2.2:309 ]
109-
```
87+
88+
a: [ 10.10.1.1:8675, 10.10.2.2:8675 ],
89+
b: [ 10.10.1.1:309, 10.10.2.2:309 ]*
90+
11091

11192
- **subsets.addresses** ([]EndpointAddress)
11293

0 commit comments

Comments
 (0)