Skip to content

Commit f11cbba

Browse files
authored
Merge pull request #40149 from fenggw-fnst/task-12
[zh-cn] sync task files of task-12
2 parents 05d9648 + 81e0aa9 commit f11cbba

File tree

5 files changed

+46
-31
lines changed

5 files changed

+46
-31
lines changed
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
---
22
title: 访问集群中的应用程序
3-
weight: 60
3+
weight: 100
44
description: 配置负载平衡、端口转发或设置防火墙或 DNS 配置,以访问集群中的应用程序。
55
---
6+
<!--
7+
title: "Access Applications in a Cluster"
8+
description: Configure load balancing, port forwarding, or setup firewall or DNS configurations to access applications in a cluster.
9+
weight: 100
10+
-->

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
---
22
title: 访问集群上运行的服务
33
content_type: task
4+
weight: 140
45
---
6+
<!--
7+
title: Access Services Running on Clusters
8+
content_type: task
9+
weight: 140
10+
-->
511

612
<!-- overview -->
713
<!--

content/zh-cn/docs/tasks/access-application-cluster/communicate-containers-same-pod-shared-volume.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
---
22
title: 同 Pod 内的容器使用共享卷通信
33
content_type: task
4+
weight: 120
45
---
56
<!--
67
title: Communicate Between Containers in the Same Pod Using a Shared Volume
78
content_type: task
8-
weight: 110
9+
weight: 120
910
-->
1011
<!-- overview -->
1112

@@ -162,7 +163,10 @@ directory. Use `curl` to send a GET request to the nginx server:
162163
root@two-containers:/# curl localhost
163164
```
164165

165-
输出表示 nginx 提供了 debian 容器写的页面:
166+
<!--
167+
The output shows that nginx serves a web page written by the debian container:
168+
-->
169+
输出表示 nginx 向外提供了 debian 容器所写就的页面:
166170

167171
```
168172
Hello from the debian container

content/zh-cn/docs/tasks/access-application-cluster/configure-access-multiple-clusters.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -66,24 +66,24 @@ cluster's API server.
6666
<!--
6767
## Define clusters, users, and contexts
6868
69-
Suppose you have two clusters, one for development work and one for scratch work.
69+
Suppose you have two clusters, one for development work and one for test work.
7070
In the `development` cluster, your frontend developers work in a namespace called `frontend`,
71-
and your storage developers work in a namespace called `storage`. In your `scratch` cluster,
71+
and your storage developers work in a namespace called `storage`. In your `test` cluster,
7272
developers work in the default namespace, or they create auxiliary namespaces as they
7373
see fit. Access to the development cluster requires authentication by certificate. Access
74-
to the scratch cluster requires authentication by username and password.
74+
to the test cluster requires authentication by username and password.
7575
7676
Create a directory named `config-exercise`. In your
7777
`config-exercise` directory, create a file named `config-demo` with this content:
7878
-->
7979
## 定义集群、用户和上下文 {#define-clusters-users-and-contexts}
8080

81-
假设用户有两个集群,一个用于正式开发工作,一个用于其它临时用途(scratch)。
81+
假设用户有两个集群,一个用于开发工作(development),一个用于测试工作(test)。
8282
`development` 集群中,前端开发者在名为 `frontend` 的名字空间下工作,
83-
存储开发者在名为 `storage` 的名字空间下工作。在 `scratch` 集群中,
83+
存储开发者在名为 `storage` 的名字空间下工作。在 `test` 集群中,
8484
开发人员可能在默认名字空间下工作,也可能视情况创建附加的名字空间。
8585
访问开发集群需要通过证书进行认证。
86-
访问其它临时用途的集群需要通过用户名和密码进行认证
86+
访问测试集群需要通过用户名和密码进行认证
8787

8888
创建名为 `config-exercise` 的目录。在
8989
`config-exercise` 目录中,创建名为 `config-demo` 的文件,其内容为:
@@ -97,7 +97,7 @@ clusters:
9797
- cluster:
9898
name: development
9999
- cluster:
100-
name: scratch
100+
name: test
101101

102102
users:
103103
- name: developer
@@ -109,7 +109,7 @@ contexts:
109109
- context:
110110
name: dev-storage
111111
- context:
112-
name: exp-scratch
112+
name: exp-test
113113
```
114114
115115
<!--
@@ -126,7 +126,7 @@ your configuration file:
126126

127127
```shell
128128
kubectl config --kubeconfig=config-demo set-cluster development --server=https://1.2.3.4 --certificate-authority=fake-ca-file
129-
kubectl config --kubeconfig=config-demo set-cluster scratch --server=https://5.6.7.8 --insecure-skip-tls-verify
129+
kubectl config --kubeconfig=config-demo set-cluster test --server=https://5.6.7.8 --insecure-skip-tls-verify
130130
```
131131

132132
<!--
@@ -167,7 +167,7 @@ Add context details to your configuration file:
167167
```shell
168168
kubectl config --kubeconfig=config-demo set-context dev-frontend --cluster=development --namespace=frontend --user=developer
169169
kubectl config --kubeconfig=config-demo set-context dev-storage --cluster=development --namespace=storage --user=developer
170-
kubectl config --kubeconfig=config-demo set-context exp-scratch --cluster=scratch --namespace=default --user=experimenter
170+
kubectl config --kubeconfig=config-demo set-context exp-test --cluster=test --namespace=default --user=experimenter
171171
```
172172

173173
<!--
@@ -196,7 +196,7 @@ clusters:
196196
- cluster:
197197
insecure-skip-tls-verify: true
198198
server: https://5.6.7.8
199-
name: scratch
199+
name: test
200200
contexts:
201201
- context:
202202
cluster: development
@@ -209,10 +209,10 @@ contexts:
209209
user: developer
210210
name: dev-storage
211211
- context:
212-
cluster: scratch
212+
cluster: test
213213
namespace: default
214214
user: experimenter
215-
name: exp-scratch
215+
name: exp-test
216216
current-context: ""
217217
kind: Config
218218
preferences: {}
@@ -310,29 +310,29 @@ users:
310310
```
311311

312312
<!--
313-
Now suppose you want to work for a while in the scratch cluster.
313+
Now suppose you want to work for a while in the test cluster.
314314

315-
Change the current context to `exp-scratch`:
315+
Change the current context to `exp-test`:
316316
-->
317-
现在假设用户希望在其它临时用途集群中工作一段时间
317+
现在假设用户希望在测试集群中工作一段时间
318318

319-
将当前上下文更改为 `exp-scratch`:
319+
将当前上下文更改为 `exp-test`:
320320

321321
```shell
322-
kubectl config --kubeconfig=config-demo use-context exp-scratch
322+
kubectl config --kubeconfig=config-demo use-context exp-test
323323
```
324324

325325
<!--
326326
Now any `kubectl` command you give will apply to the default namespace of
327-
the `scratch` cluster. And the command will use the credentials of the user
328-
listed in the `exp-scratch` context.
327+
the `test` cluster. And the command will use the credentials of the user
328+
listed in the `exp-test` context.
329329

330-
View configuration associated with the new current context, `exp-scratch`.
330+
View configuration associated with the new current context, `exp-test`.
331331
-->
332-
现在你发出的所有 `kubectl` 命令都将应用于 `scratch` 集群的默认名字空间。
333-
同时,命令会使用 `exp-scratch` 上下文中所列用户的凭证。
332+
现在你发出的所有 `kubectl` 命令都将应用于 `test` 集群的默认名字空间。
333+
同时,命令会使用 `exp-test` 上下文中所列用户的凭证。
334334

335-
查看更新后的当前上下文 `exp-scratch` 相关的配置:
335+
查看更新后的当前上下文 `exp-test` 相关的配置:
336336

337337
```shell
338338
kubectl config --kubeconfig=config-demo view --minify
@@ -476,10 +476,10 @@ contexts:
476476
user: developer
477477
name: dev-storage
478478
- context:
479-
cluster: scratch
479+
cluster: test
480480
namespace: default
481481
user: experimenter
482-
name: exp-scratch
482+
name: exp-test
483483
```
484484

485485
<!--

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
title: 为集群配置 DNS
3-
weight: 120
3+
weight: 130
44
content_type: concept
55
---
66

77
<!--
88
---
99
title: Configure DNS for a Cluster
10-
weight: 120
10+
weight: 130
1111
content_type: concept
1212
---
1313
-->

0 commit comments

Comments
 (0)