@@ -48,7 +48,7 @@ that Deployment can create and destroy Pods dynamically. From one moment to the
48
48
you don't know how many of those Pods are working and healthy; you might not even know
49
49
what those healthy Pods are named.
50
50
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
52
52
expect that an individual Pod is reliable and durable).
53
53
-->
54
54
如果你使用 {{< glossary_tooltip term_id="deployment" >}} 来运行你的应用,
@@ -233,10 +233,14 @@ field.
233
233
{{< /note >}}
234
234
235
235
<!--
236
+ # ## Port definitions {#field-spec-ports}
237
+
236
238
Port definitions in Pods have names, and you can reference these names in the
237
239
` targetPort` attribute of a Service. For example, we can bind the `targetPort`
238
240
of the Service to the Pod port in the following way :
239
241
-->
242
+ # ## 端口定义 {#field-spec-ports}
243
+
240
244
Pod 中的端口定义是有名字的,你可以在 Service 的 `targetPort` 属性中引用这些名称。
241
245
例如,我们可以通过以下方式将 Service 的 `targetPort` 绑定到 Pod 端口:
242
246
@@ -286,14 +290,14 @@ The default protocol for Services is
286
290
[TCP](/docs/reference/networking/service-protocols/#protocol-tcp); you can also
287
291
use any other [supported protocol](/docs/reference/networking/service-protocols/).
288
292
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 .
291
295
Each port definition can have the same `protocol`, or a different one.
292
296
-->
293
297
服务的默认协议是 [TCP](/zh-cn/docs/reference/networking/service-protocols/#protocol-tcp);
294
298
你还可以使用任何其他[受支持的协议](/zh-cn/docs/reference/networking/service-protocols/)。
295
299
296
- 由于许多服务需要公开多个端口,因此 Kubernetes 在服务对象上支持多个端口定义 。
300
+ 由于许多服务需要公开多个端口,所以 Kubernetes 针对单个服务支持[多个端口定义](#multi-port-services) 。
297
301
每个端口定义可以具有相同的 `protocol`,也可以具有不同的协议。
298
302
299
303
<!--
@@ -576,15 +580,15 @@ domain prefixed names such as `mycompany.com/my-custom-protocol`.
576
580
或以域名为前缀的名称,如 `mycompany.com/my-custom-protocol`。
577
581
578
582
<!--
579
- # # Multi-Port Services
583
+ # ## Multi-Port Services
580
584
581
585
For some Services, you need to expose more than one port.
582
586
Kubernetes lets you configure multiple port definitions on a Service object.
583
587
When using multiple ports for a Service, you must give all of your ports names
584
588
so that these are unambiguous.
585
589
For example :
586
590
-->
587
- # # 多端口 Service {#multi-port-services}
591
+ # ## 多端口 Service {#multi-port-services}
588
592
589
593
对于某些服务,你需要公开多个端口。
590
594
Kubernetes 允许你在 Service 对象上配置多个端口定义。
0 commit comments