Skip to content

Commit 8b7e4f3

Browse files
authored
Merge pull request #39676 from Zhuzhenghao/service-access-application-cluster
[zh] resync page in tasks/access-application-cluster
2 parents 8566c8a + 71a81bf commit 8b7e4f3

File tree

5 files changed

+72
-44
lines changed

5 files changed

+72
-44
lines changed

content/zh-cn/docs/tasks/access-application-cluster/connecting-frontend-backend.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ First, explore the Service configuration file:
148148
{{< codenew file="service/access/backend-service.yaml" >}}
149149

150150
<!--
151-
In the configuration file, you can see that the Service named `hello` routes
151+
In the configuration file, you can see that the Service, named `hello` routes
152152
traffic to Pods that have the labels `app: hello` and `tier: backend`.
153153
-->
154154
配置文件中,你可以看到名为 `hello` 的 Service 将流量路由到包含 `app: hello`
@@ -182,8 +182,8 @@ given to the backend Service. The DNS name is `hello`, which is the value
182182
of the `name` field in the `examples/service/access/backend-service.yaml`
183183
configuration file.
184184
185-
The Pods in the frontend Deployment run an nginx image that is configured
186-
to proxy requests to the hello backend Service. Here is the nginx configuration file:
185+
The Pods in the frontend Deployment run a nginx image that is configured
186+
to proxy requests to the `hello` backend Service. Here is the nginx configuration file:
187187
-->
188188
### 创建前端应用
189189

@@ -195,7 +195,7 @@ to proxy requests to the hello backend Service. Here is the nginx configuration
195195
文件中 `name` 字段的取值。
196196

197197
前端 Deployment 中的 Pods 运行一个 nginx 镜像,这个已经配置好的镜像会将请求转发
198-
给后端的 hello Service。下面是 nginx 的配置文件:
198+
给后端的 `hello` Service。下面是 nginx 的配置文件:
199199

200200
{{< codenew file="service/access/frontend-nginx.conf" >}}
201201

@@ -235,14 +235,14 @@ deployment.apps/frontend created
235235
service/frontend created
236236
```
237237

238+
{{< note >}}
238239
<!--
239240
The nginx configuration is baked into the
240241
[container image](/examples/service/access/Dockerfile). A better way to do this would
241242
be to use a
242243
[ConfigMap](/docs/tasks/configure-pod-container/configure-pod-configmap/),
243244
so that you can change the configuration more easily.
244245
-->
245-
{{< note >}}
246246
这个 nginx 配置文件是被打包在
247247
[容器镜像](/examples/service/access/Dockerfile) 里的。
248248
更好的方法是使用
@@ -261,7 +261,7 @@ command to find the external IP:
261261
一旦你创建了 LoadBalancer 类型的 Service,你可以使用这条命令查看外部 IP:
262262

263263
```shell
264-
kubectl get service frontend
264+
kubectl get service frontend --watch
265265
```
266266

267267
<!--
@@ -271,8 +271,8 @@ changes. Initially, the external IP is listed as `<pending>`:
271271
外部 IP 字段的生成可能需要一些时间。如果是这种情况,外部 IP 会显示为 `<pending>`
272272

273273
```
274-
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
275-
frontend 10.51.252.116 <pending> 80/TCP 10s
274+
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
275+
frontend LoadBalancer 10.51.252.116 <pending> 80/TCP 10s
276276
```
277277

278278
<!--
@@ -282,8 +282,8 @@ to include the new IP under the `EXTERNAL-IP` heading:
282282
当外部 IP 地址被分配可用时,配置会更新,在 `EXTERNAL-IP` 头部下显示新的 IP:
283283

284284
```
285-
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
286-
frontend 10.51.252.116 XXX.XXX.XXX.XXX 80/TCP 1m
285+
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
286+
frontend LoadBalancer 10.51.252.116 XXX.XXX.XXX.XXX 80/TCP 1m
287287
```
288288

289289
<!--
@@ -336,6 +336,7 @@ To delete the Deployments, the ReplicaSets and the Pods that are running the bac
336336
```shell
337337
kubectl delete deployment frontend backend
338338
```
339+
339340
## {{% heading "whatsnext" %}}
340341

341342
<!--
@@ -346,4 +347,3 @@ kubectl delete deployment frontend backend
346347
* 进一步了解 [Service](/zh-cn/docs/concepts/services-networking/service/)
347348
* 进一步了解 [ConfigMap](/zh-cn/docs/tasks/configure-pod-container/configure-pod-configmap/)
348349
* 进一步了解 [Service 和 Pods 的 DNS](/zh-cn/docs/concepts/services-networking/dns-pod-service/)
349-

content/zh-cn/docs/tasks/access-application-cluster/create-external-load-balancer.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,10 @@ The load balancer's IP address is listed next to `LoadBalancer Ingress`.
160160
-->
161161
负载均衡器的 IP 地址列在 `LoadBalancer Ingress` 旁边。
162162
163+
{{< note >}}
163164
<!--
164165
If you are running your service on Minikube, you can find the assigned IP address and port with:
165166
-->
166-
{{< note >}}
167167
如果你在 Minikube 上运行服务,你可以通过以下命令找到分配的 IP 地址和端口:
168168
169169
```bash
@@ -264,7 +264,7 @@ Internal pod to pod traffic should behave similar to ClusterIP services, with eq
264264
内部 Pod 到 Pod 的流量应该与 ClusterIP 服务类似,所有 Pod 的概率相同。
265265

266266
<!--
267-
## Garbage Collecting Load Balancers
267+
## Garbage collecting load balancers
268268
-->
269269
## 回收负载均衡器 {#garbage-collecting-load-balancers}
270270

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: 在 Minikube 环境中使用 NGINX Ingress 控制器配置 Ingress
33
content_type: task
4-
weight: 100
4+
weight: 110
55
min-kubernetes-server-version: 1.19
66
---
77
<!--
@@ -49,7 +49,7 @@ Locally
4949
: If you already [installed Minikube](/docs/tasks/tools/#minikube)
5050
locally, run `minikube start` to create a cluster.
5151
-->
52-
### 创建一个 Minikube 集群 {#create-minikube-cluster}
52+
### 创建一个 Minikube 集群 {#create-minikube-cluster}
5353

5454
使用 Katacoda
5555
: {{< kat-button >}}
@@ -201,7 +201,7 @@ Locally
201201
```
202202

203203
<!--
204-
1. Visit the service via NodePort:
204+
1. Visit the Service via NodePort:
205205
-->
206206
4. 使用节点端口信息访问服务:
207207

@@ -327,7 +327,7 @@ The following manifest defines an Ingress that sends traffic to your Service via
327327
Ingress 列表中显示的 IP 地址会是内部 IP 地址。
328328
{{< /note >}}
329329

330-
<!--
330+
<!--
331331
After you make this change, your web browser sends requests for
332332
`hello-world.info` URLs to Minikube.
333333
-->
@@ -439,7 +439,7 @@ The following manifest defines an Ingress that sends traffic to your Service via
439439
```
440440

441441
<!--
442-
## Test Your Ingress
442+
## Test your Ingress
443443
444444
1. Access the 1st version of the Hello World app.
445445
-->

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Here is the configuration file for the application Deployment:
7373
和一个关联的 {{< glossary_tooltip term_id="replica-set" text="ReplicaSet" >}} 对象。
7474
这个 ReplicaSet 有两个 {{< glossary_tooltip text="Pod" term_id="pod" >}},
7575
每个 Pod 都运行着 Hello World 应用。
76-
76+
7777
<!--
7878
1. Display information about the Deployment:
7979
-->
@@ -117,7 +117,7 @@ Here is the configuration file for the application Deployment:
117117
-->
118118
输出类似于:
119119

120-
```
120+
```none
121121
Name: example-service
122122
Namespace: default
123123
Labels: run=load-balancer-example
@@ -154,11 +154,12 @@ Here is the configuration file for the application Deployment:
154154

155155
输出类似于:
156156

157-
```
157+
```none
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
161161
```
162+
162163
<!--
163164
1. Get the public IP address of one of your nodes that is running
164165
a Hello World pod. How you get this address depends on how you set
@@ -198,7 +199,7 @@ Here is the configuration file for the application Deployment:
198199
这里的 `<public-node-ip>` 是你节点的公共 IP 地址,`<node-port>` 是你服务的 NodePort 值。
199200
对于请求成功的响应是一个 hello 消息:
200201

201-
```shell
202+
```none
202203
Hello Kubernetes!
203204
```
204205

@@ -243,4 +244,3 @@ Follow the
243244
tutorial.
244245
-->
245246
跟随教程[使用 Service 连接到应用](/zh-cn/docs/tutorials/services/connect-applications-service/)
246-

0 commit comments

Comments
 (0)