Skip to content

Commit 7ea613a

Browse files
authored
Merge pull request #37932 from windsonsea/exteip
[zh] sync expose-external-ip-address.md
2 parents 9aa0e7f + f5133a6 commit 7ea613a

File tree

1 file changed

+21
-11
lines changed

1 file changed

+21
-11
lines changed

content/zh-cn/docs/tutorials/stateless-application/expose-external-ip-address.md

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ external IP address.
5050
<!--
5151
## Creating a service for an application running in five pods
5252
-->
53-
## 为一个在五个 pod 中运行的应用程序创建服务
53+
## 为一个在五个 pod 中运行的应用程序创建服务 {#creating-a-service-for-an-app-running-in-five-pods}
5454

5555
<!--
5656
1. Run a Hello World application in your cluster:
@@ -62,6 +62,7 @@ external IP address.
6262
```shell
6363
kubectl apply -f https://k8s.io/examples/service/load-balancer-example.yaml
6464
```
65+
6566
<!--
6667
The preceding command creates a
6768
{{< glossary_tooltip text="Deployment" term_id="deployment" >}}
@@ -71,6 +72,7 @@ external IP address.
7172
{{< glossary_tooltip text="Pods" term_id="pod" >}}
7273
each of which runs the Hello World application.
7374
-->
75+
7476
前面的命令创建一个
7577
{{< glossary_tooltip text="Deployment" term_id="deployment" >}}
7678
对象和一个关联的
@@ -119,27 +121,28 @@ external IP address.
119121
<!--
120122
The output is similar to this:
121123
-->
124+
122125
输出类似于:
123126

124127
```console
125128
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
126129
my-service LoadBalancer 10.3.245.137 104.198.205.71 8080/TCP 54s
127130
```
128131

129-
<!--
130132
{{< note >}}
133+
<!--
131134
The `type=LoadBalancer` service is backed by external cloud providers, which is not covered in this example, please refer to [this page](/docs/concepts/services-networking/service/#loadbalancer) for the details.
132-
{{< /note >}}
133135
-->
134-
提示:`type=LoadBalancer` 服务由外部云服务提供商提供支持,本例中不包含此部分,
136+
`type=LoadBalancer` 服务由外部云服务提供商提供支持,本例中不包含此部分,
135137
详细信息请参考[此页](/zh-cn/docs/concepts/services-networking/service/#loadbalancer)
138+
{{< /note >}}
136139

137-
<!--
138140
{{< note >}}
141+
<!--
139142
If the external IP address is shown as \<pending\>, wait for a minute and enter the same command again.
140-
{{< /note >}}
141143
-->
142-
提示:如果外部 IP 地址显示为 \<pending\>,请等待一分钟再次输入相同的命令。
144+
如果外部 IP 地址显示为 \<pending\>,请等待一分钟再次输入相同的命令。
145+
{{< /note >}}
143146

144147
<!--
145148
1. Display detailed information about the Service:
@@ -153,6 +156,7 @@ external IP address.
153156
<!--
154157
The output is similar to this:
155158
-->
159+
156160
输出类似于:
157161

158162
```console
@@ -170,12 +174,14 @@ external IP address.
170174
Session Affinity: None
171175
Events: <none>
172176
```
177+
173178
<!--
174179
Make a note of the external IP address (`LoadBalancer Ingress`) exposed by
175180
your service. In this example, the external IP address is 104.198.205.71.
176181
Also note the value of `Port` and `NodePort`. In this example, the `Port`
177182
is 8080 and the `NodePort` is 32377.
178183
-->
184+
179185
记下服务公开的外部 IP 地址(`LoadBalancer Ingress`)。
180186
在本例中,外部 IP 地址是 104.198.205.71。还要注意 `Port``NodePort` 的值。
181187
在本例中,`Port` 是 8080,`NodePort` 是 32377。
@@ -198,6 +204,7 @@ external IP address.
198204
<!--
199205
The output is similar to this:
200206
-->
207+
201208
输出类似于:
202209

203210
```console
@@ -225,13 +232,16 @@ external IP address.
225232
If you are using minikube, typing `minikube service my-service` will
226233
automatically open the Hello World application in a browser.
227234
-->
235+
228236
其中 `<external-ip>` 是你的服务的外部 IP 地址(`LoadBalancer Ingress`),
229237
`<port>` 是你的服务描述中的 `port` 的值。
230-
如果你正在使用 minikube,输入 `minikube service my-service` 将在浏览器中自动打开 Hello World 应用程序。
238+
如果你正在使用 minikube,输入 `minikube service my-service`
239+
将在浏览器中自动打开 Hello World 应用程序。
231240

232241
<!--
233242
The response to a successful request is a hello message:
234243
-->
244+
235245
成功请求的响应是一条问候消息:
236246

237247
```shell
@@ -253,7 +263,7 @@ kubectl delete services my-service
253263
To delete the Deployment, the ReplicaSet, and the Pods that are running
254264
the Hello World application, enter this command:
255265
-->
256-
要删除正在运行 Hello World 应用程序的 DeploymentReplicaSet 和 Pod,请输入以下命令:
266+
要删除正在运行 Hello World 应用程序的 DeploymentReplicaSet 和 Pod,请输入以下命令:
257267

258268
```shell
259269
kubectl delete deployment hello-world
@@ -263,7 +273,7 @@ kubectl delete deployment hello-world
263273

264274
<!--
265275
Learn more about
266-
[connecting applications with services](/docs/concepts/services-networking/connect-applications-service/).
276+
[connecting applications with services](/docs/tutorials/services/connect-applications-service/).
267277
-->
268-
进一步了解[将应用程序与服务连接](/zh-cn/docs/concepts/services-networking/connect-applications-service/)
278+
进一步了解[使用 Service 连接到应用](/zh-cn/docs/tutorials/services/connect-applications-service/)
269279

0 commit comments

Comments
 (0)