1
1
---
2
- title : 公开外部 IP 地址以访问集群中应用程序
2
+ title : 公开外部 IP 地址以访问集群中的应用
3
3
content_type : tutorial
4
4
weight : 10
5
5
---
@@ -41,21 +41,21 @@ external IP address.
41
41
* Create a Service object that exposes an external IP address.
42
42
* Use the Service object to access the running application.
43
43
-->
44
- * 运行 Hello World 应用程序的五个实例 。
44
+ * 运行 Hello World 应用的五个实例 。
45
45
* 创建一个公开外部 IP 地址的 Service 对象。
46
- * 使用 Service 对象访问正在运行的应用程序 。
46
+ * 使用 Service 对象访问正在运行的应用 。
47
47
48
48
<!-- lessoncontent -->
49
49
50
50
<!--
51
51
## Creating a service for an application running in five pods
52
52
-->
53
- ## 为一个在五个 pod 中运行的应用程序创建服务 {#creating-a-service-for-an-app-running-in-five-pods}
53
+ ## 为在五个 Pod 中运行的应用创建服务 {#creating-a-service-for-an-app-running-in-five-pods}
54
54
55
55
<!--
56
56
1. Run a Hello World application in your cluster:
57
57
-->
58
- 1 . 在集群中运行 Hello World 应用程序 :
58
+ 1 . 在集群中运行 Hello World 应用 :
59
59
60
60
{{% code_sample file="service/load-balancer-example.yaml" %}}
61
61
@@ -78,7 +78,7 @@ external IP address.
78
78
对象和一个关联的
79
79
{{< glossary_tooltip term_id="replica-set" text="ReplicaSet" >}} 对象。
80
80
ReplicaSet 有五个 {{< glossary_tooltip text="Pod" term_id="pod" >}},
81
- 每个都运行 Hello World 应用程序 。
81
+ 每个都运行 Hello World 应用 。
82
82
83
83
<!--
84
84
1. Display information about the Deployment:
@@ -194,7 +194,7 @@ external IP address.
194
194
-->
195
195
7 . 在前面的输出中,你可以看到服务有几个端点:
196
196
10.0.0.6:8080、10.0.1.6:8080、10.0.1.7:8080 和另外两个,
197
- 这些都是正在运行 Hello World 应用程序的 Pod 的内部地址。
197
+ 这些都是正在运行 Hello World 应用的 Pod 的内部地址。
198
198
要验证这些是 Pod 地址,请输入以下命令:
199
199
200
200
``` shell
@@ -219,7 +219,7 @@ external IP address.
219
219
1. Use the external IP address (`LoadBalancer Ingress`) to access the Hello
220
220
World application:
221
221
-->
222
- 8 . 使用外部 IP 地址(` LoadBalancer Ingress ` )访问 Hello World 应用程序 :
222
+ 8 . 使用外部 IP 地址(` LoadBalancer Ingress ` )访问 Hello World 应用 :
223
223
224
224
``` shell
225
225
curl http://< external-ip> :< port>
@@ -236,7 +236,7 @@ external IP address.
236
236
其中 ` <external-ip> ` 是你的服务的外部 IP 地址(` LoadBalancer Ingress ` ),
237
237
` <port> ` 是你的服务描述中的 ` port ` 的值。
238
238
如果你正在使用 minikube,输入 ` minikube service my-service `
239
- 将在浏览器中自动打开 Hello World 应用程序 。
239
+ 将在浏览器中自动打开 Hello World 应用 。
240
240
241
241
<!--
242
242
The response to a successful request is a hello message:
@@ -247,7 +247,7 @@ external IP address.
247
247
``` shell
248
248
Hello, world!
249
249
Version: 2.0.0
250
- Hostname: hello-world-2895499144-2e5uh
250
+ Hostname: 0bd46b45f32f
251
251
```
252
252
253
253
## {{% heading "cleanup" %}}
@@ -265,7 +265,7 @@ kubectl delete services my-service
265
265
To delete the Deployment, the ReplicaSet, and the Pods that are running
266
266
the Hello World application, enter this command:
267
267
-->
268
- 要删除正在运行 Hello World 应用程序的 Deployment、ReplicaSet 和 Pod,请输入以下命令:
268
+ 要删除正在运行 Hello World 应用的 Deployment、ReplicaSet 和 Pod,请输入以下命令:
269
269
270
270
``` shell
271
271
kubectl delete deployment hello-world
0 commit comments