Skip to content

Commit 7cb4bda

Browse files
authored
Merge pull request #37497 from windsonsea/seracc
[zh] sync service-access-application-cluster.md
2 parents 453dd71 + dbd86d2 commit 7cb4bda

File tree

1 file changed

+21
-20
lines changed

1 file changed

+21
-20
lines changed

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

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ provides load balancing for an application that has two running instances.
2222

2323
## {{% heading "prerequisites" %}}
2424

25-
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
25+
{{< include "task-tutorial-prereqs.md" >}}
2626

2727
## {{% heading "objectives" %}}
2828

@@ -42,7 +42,7 @@ provides load balancing for an application that has two running instances.
4242
4343
Here is the configuration file for the application Deployment:
4444
-->
45-
## 为运行在两个 pod 中的应用创建一个服务
45+
## 为运行在两个 Pod 中的应用创建一个服务 {#creating-a-service-for-an-app-running-in-two-pods}
4646

4747
这是应用程序部署的配置文件:
4848

@@ -55,24 +55,24 @@ Here is the configuration file for the application Deployment:
5555
kubectl apply -f https://k8s.io/examples/service/access/hello-application.yaml
5656
```
5757
The preceding command creates a
58-
[Deployment](/docs/concepts/workloads/controllers/deployment/)
59-
object and an associated
60-
[ReplicaSet](/docs/concepts/workloads/controllers/replicaset/)
61-
object. The ReplicaSet has two
62-
[Pods](/docs/concepts/workloads/pods/pod/),
58+
{{< glossary_tooltip text="Deployment" term_id="deployment" >}}
59+
and an associated
60+
{{< glossary_tooltip term_id="replica-set" text="ReplicaSet" >}}.
61+
The ReplicaSet has two
62+
{{< glossary_tooltip text="Pods" term_id="pod" >}}
6363
each of which runs the Hello World application.
6464
-->
65-
6665
1. 在你的集群中运行一个 Hello World 应用:
6766
使用上面的文件创建应用程序 Deployment:
6867

6968
```shell
7069
kubectl apply -f https://k8s.io/examples/service/access/hello-application.yaml
7170
```
7271

73-
上面的命令创建一个 [Deployment](/zh-cn/docs/concepts/workloads/controllers/deployment/) 对象
74-
和一个关联的 [ReplicaSet](/zh-cn/docs/concepts/workloads/controllers/replicaset/) 对象。
75-
这个 ReplicaSet 有两个 [Pod](/zh-cn/docs/concepts/workloads/pods/)
72+
上面的命令创建一个
73+
{{< glossary_tooltip text="Deployment" term_id="deployment" >}} 对象
74+
和一个关联的 {{< glossary_tooltip term_id="replica-set" text="ReplicaSet" >}} 对象。
75+
这个 ReplicaSet 有两个 {{< glossary_tooltip text="Pod" term_id="pod" >}},
7676
每个 Pod 都运行着 Hello World 应用。
7777

7878
<!--
@@ -143,7 +143,7 @@ Here is the configuration file for the application Deployment:
143143
<!--
144144
1. List the pods that are running the Hello World application:
145145
-->
146-
7. 列出运行 Hello World 应用的 Pod:
146+
6. 列出运行 Hello World 应用的 Pod:
147147

148148
```shell
149149
kubectl get pods --selector="run=load-balancer-example" --output=wide
@@ -175,15 +175,16 @@ Here is the configuration file for the application Deployment:
175175
176176
1. Use the node address and node port to access the Hello World application:
177177
-->
178-
8. 获取运行 Hello World 的 pod 的其中一个节点的公共 IP 地址。如何获得此地址取决于你设置集群的方式。
178+
7. 获取运行 Hello World 的 pod 的其中一个节点的公共 IP 地址。如何获得此地址取决于你设置集群的方式。
179179
例如,如果你使用的是 Minikube,则可以通过运行 `kubectl cluster-info` 来查看节点地址。
180-
如果你使用的是 Google Compute Engine 实例,则可以使用 `gcloud compute instances list` 命令查看节点的公共地址。
180+
如果你使用的是 Google Compute Engine 实例,
181+
则可以使用 `gcloud compute instances list` 命令查看节点的公共地址。
181182

182-
9. 在你选择的节点上,创建一个防火墙规则以开放节点端口上的 TCP 流量。
183+
8. 在你选择的节点上,创建一个防火墙规则以开放节点端口上的 TCP 流量。
183184
例如,如果你的服务的 NodePort 值为 31568,请创建一个防火墙规则以允许 31568 端口上的 TCP 流量。
184185
不同的云提供商提供了不同方法来配置防火墙规则。
185186

186-
10. 使用节点地址和 node port 来访问 Hello World 应用:
187+
9. 使用节点地址和 node port 来访问 Hello World 应用:
187188

188189
```shell
189190
curl http://<public-node-ip>:<node-port>
@@ -208,10 +209,10 @@ As an alternative to using `kubectl expose`, you can use a
208209
[service configuration file](/docs/concepts/services-networking/service/)
209210
to create a Service.
210211
-->
211-
## 使用服务配置文件
212+
## 使用服务配置文件 {#using-a-service-configuration-file}
212213

213-
作为 `kubectl expose` 的替代方法,你可以使用
214-
[服务配置文件](/zh-cn/docs/concepts/services-networking/service/) 来创建服务。
214+
作为 `kubectl expose` 的替代方法,
215+
你可以使用[服务配置文件](/zh-cn/docs/concepts/services-networking/service/)来创建服务。
215216

216217
## {{% heading "cleanup" %}}
217218

@@ -240,5 +241,5 @@ kubectl delete deployment hello-world
240241
Learn more about
241242
[connecting applications with services](/docs/concepts/services-networking/connect-applications-service/).
242243
-->
243-
- 进一步了解[通过服务连接应用](/zh-cn/docs/concepts/services-networking/connect-applications-service/)
244+
进一步了解[通过服务连接应用](/zh-cn/docs/concepts/services-networking/connect-applications-service/)
244245

0 commit comments

Comments
 (0)