Skip to content

Commit 8943125

Browse files
authored
Merge pull request #40324 from asa3311/sync-service.md
[zh-cn]sync service.md
2 parents 133e93b + 38d936f commit 8943125

File tree

1 file changed

+10
-6
lines changed
  • content/zh-cn/docs/concepts/services-networking

1 file changed

+10
-6
lines changed

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

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ that Deployment can create and destroy Pods dynamically. From one moment to the
4848
you don't know how many of those Pods are working and healthy; you might not even know
4949
what those healthy Pods are named.
5050
Kubernetes {{< glossary_tooltip term_id="pod" text="Pods" >}} are created and destroyed
51-
to match the desired state of your cluster. Pods are emphemeral resources (you should not
51+
to match the desired state of your cluster. Pods are ephemeral resources (you should not
5252
expect that an individual Pod is reliable and durable).
5353
-->
5454
如果你使用 {{< glossary_tooltip term_id="deployment" >}} 来运行你的应用,
@@ -233,10 +233,14 @@ field.
233233
{{< /note >}}
234234

235235
<!--
236+
### Port definitions {#field-spec-ports}
237+
236238
Port definitions in Pods have names, and you can reference these names in the
237239
`targetPort` attribute of a Service. For example, we can bind the `targetPort`
238240
of the Service to the Pod port in the following way:
239241
-->
242+
### 端口定义 {#field-spec-ports}
243+
240244
Pod 中的端口定义是有名字的,你可以在 Service 的 `targetPort` 属性中引用这些名称。
241245
例如,我们可以通过以下方式将 Service 的 `targetPort` 绑定到 Pod 端口:
242246

@@ -286,14 +290,14 @@ The default protocol for Services is
286290
[TCP](/docs/reference/networking/service-protocols/#protocol-tcp); you can also
287291
use any other [supported protocol](/docs/reference/networking/service-protocols/).
288292

289-
As many Services need to expose more than one port, Kubernetes supports multiple
290-
port definitions on a Service object.
293+
Because many Services need to expose more than one port, Kubernetes supports
294+
+[multiple port definitions](#multi-port-services) for a single Service.
291295
Each port definition can have the same `protocol`, or a different one.
292296
-->
293297
服务的默认协议是 [TCP](/zh-cn/docs/reference/networking/service-protocols/#protocol-tcp);
294298
你还可以使用任何其他[受支持的协议](/zh-cn/docs/reference/networking/service-protocols/)。
295299

296-
由于许多服务需要公开多个端口,因此 Kubernetes 在服务对象上支持多个端口定义
300+
由于许多服务需要公开多个端口,所以 Kubernetes 针对单个服务支持[多个端口定义](#multi-port-services)
297301
每个端口定义可以具有相同的 `protocol`,也可以具有不同的协议。
298302

299303
<!--
@@ -576,15 +580,15 @@ domain prefixed names such as `mycompany.com/my-custom-protocol`.
576580
或以域名为前缀的名称,如 `mycompany.com/my-custom-protocol`。
577581

578582
<!--
579-
## Multi-Port Services
583+
### Multi-Port Services
580584

581585
For some Services, you need to expose more than one port.
582586
Kubernetes lets you configure multiple port definitions on a Service object.
583587
When using multiple ports for a Service, you must give all of your ports names
584588
so that these are unambiguous.
585589
For example:
586590
-->
587-
## 多端口 Service {#multi-port-services}
591+
### 多端口 Service {#multi-port-services}
588592

589593
对于某些服务,你需要公开多个端口。
590594
Kubernetes 允许你在 Service 对象上配置多个端口定义。

0 commit comments

Comments
 (0)