Skip to content

Commit 31b78c8

Browse files
authored
Merge pull request #37934 from windsonsea/seracc
[zh] sync service-access-application-cluster.md
2 parents c7660fb + 92c9f66 commit 31b78c8

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

content/zh-cn/docs/tasks/access-application-cluster/service-access-application-cluster.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ title: 使用服务来访问集群中的应用
33
content_type: tutorial
44
weight: 60
55
---
6-
76
<!--
87
title: Use a Service to Access an Application in a Cluster
98
content_type: tutorial
@@ -32,7 +31,7 @@ provides load balancing for an application that has two running instances.
3231
* Use the Service object to access the running application.
3332
-->
3433
* 运行 Hello World 应用的两个实例。
35-
* 创建一个服务对象来暴露 node port
34+
* 创建一个服务对象来暴露 NodePort
3635
* 使用服务对象来访问正在运行的应用。
3736

3837
<!-- lessoncontent -->
@@ -51,23 +50,23 @@ Here is the configuration file for the application Deployment:
5150
<!--
5251
1. Run a Hello World application in your cluster:
5352
Create the application Deployment using the file above:
53+
-->
54+
1. 在你的集群中运行一个 Hello World 应用。
55+
使用上面的文件创建应用程序 Deployment:
56+
5457
```shell
5558
kubectl apply -f https://k8s.io/examples/service/access/hello-application.yaml
5659
```
60+
61+
<!--
5762
The preceding command creates a
5863
{{< glossary_tooltip text="Deployment" term_id="deployment" >}}
5964
and an associated
6065
{{< glossary_tooltip term_id="replica-set" text="ReplicaSet" >}}.
6166
The ReplicaSet has two
6267
{{< glossary_tooltip text="Pods" term_id="pod" >}}
6368
each of which runs the Hello World application.
64-
-->
65-
1. 在你的集群中运行一个 Hello World 应用:
66-
使用上面的文件创建应用程序 Deployment:
67-
68-
```shell
69-
kubectl apply -f https://k8s.io/examples/service/access/hello-application.yaml
70-
```
69+
-->
7170

7271
上面的命令创建一个
7372
{{< glossary_tooltip text="Deployment" term_id="deployment" >}} 对象
@@ -118,7 +117,7 @@ Here is the configuration file for the application Deployment:
118117
-->
119118
输出类似于:
120119

121-
```shell
120+
```
122121
Name: example-service
123122
Namespace: default
124123
Labels: run=load-balancer-example
@@ -138,7 +137,7 @@ Here is the configuration file for the application Deployment:
138137
Make a note of the NodePort value for the service. For example,
139138
in the preceding output, the NodePort value is 31496.
140139
-->
141-
注意服务中的 NodePort 值。例如在上面的输出中,NodePort 31496。
140+
注意服务中的 NodePort 值。例如在上面的输出中,NodePort 值是 31496。
142141

143142
<!--
144143
1. List the pods that are running the Hello World application:
@@ -152,9 +151,10 @@ Here is the configuration file for the application Deployment:
152151
<!--
153152
The output is similar to this:
154153
-->
154+
155155
输出类似于:
156156

157-
```shell
157+
```
158158
NAME READY STATUS ... IP NODE
159159
hello-world-2895499144-bsbk5 1/1 Running ... 10.200.1.4 worker1
160160
hello-world-2895499144-m1pwt 1/1 Running ... 10.200.2.5 worker2
@@ -238,8 +238,9 @@ kubectl delete deployment hello-world
238238
## {{% heading "whatsnext" %}}
239239

240240
<!--
241-
Learn more about
242-
[connecting applications with services](/docs/concepts/services-networking/connect-applications-service/).
241+
Follow the
242+
[Connecting Applications with Services](/docs/tutorials/services/connect-applications-service/)
243+
tutorial.
243244
-->
244-
进一步了解[通过服务连接应用](/zh-cn/docs/concepts/services-networking/connect-applications-service/)
245+
跟随教程[使用 Service 连接到应用](/zh-cn/docs/tutorials/services/connect-applications-service/)
245246

0 commit comments

Comments
 (0)