Skip to content

Commit 10681a6

Browse files
committed
[zh-cn] Sync and add anchors for tasks/access-application-cluster/*
Signed-off-by: Guangwen Feng <[email protected]>
1 parent df765f6 commit 10681a6

File tree

5 files changed

+30
-30
lines changed

5 files changed

+30
-30
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ In this exercise, you create a Pod that runs two Containers. The two containers
3333
share a Volume that they can use to communicate. Here is the configuration file
3434
for the Pod:
3535
-->
36-
## 创建一个包含两个容器的 Pod
36+
## 创建一个包含两个容器的 Pod {#creating-a-pod-that-runs-two-containers}
3737

3838
在这个练习中,你会创建一个包含两个容器的 Pod。两个容器共享一个卷用于他们之间的通信。
3939
Pod 的配置文件如下:
@@ -184,7 +184,7 @@ Typically this is done through a shared filesystem, as shown in this exercise,
184184
or through the loopback network interface, localhost. An example of this pattern is a
185185
web server along with a helper program that polls a Git repository for new updates.
186186
-->
187-
## 讨论
187+
## 讨论 {#discussion}
188188

189189
Pod 能有多个容器的主要原因是为了支持辅助应用(helper applications),以协助主应用(primary application)。
190190
辅助应用的典型例子是数据抽取,数据推送和代理。辅助应用和主应用经常需要相互通信。

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ require a supported environment. If your environment does not support this, you
6161
The backend is a simple hello greeter microservice. Here is the configuration
6262
file for the backend Deployment:
6363
-->
64-
### 使用部署对象(Deployment)创建后端
64+
### 使用部署对象(Deployment)创建后端 {#creating-the-backend-using-a-deployment}
6565

6666
后端是一个简单的 hello 欢迎微服务应用。这是后端应用的 Deployment 配置文件:
6767

@@ -136,7 +136,7 @@ the Pods that it routes traffic to.
136136
137137
First, explore the Service configuration file:
138138
-->
139-
### 创建 `hello` Service 对象
139+
### 创建 `hello` Service 对象 {#creating-the-hello-service-object}
140140

141141
将请求从前端发送到后端的关键是后端 Service。Service 创建一个固定 IP 和 DNS 解析名入口,
142142
使得后端微服务总是可达。Service 使用
@@ -185,7 +185,7 @@ configuration file.
185185
The Pods in the frontend Deployment run a nginx image that is configured
186186
to proxy requests to the `hello` backend Service. Here is the nginx configuration file:
187187
-->
188-
### 创建前端应用
188+
### 创建前端 {#creating-the-frontend}
189189

190190
现在你已经有了运行中的后端应用,你可以创建一个可在集群外部访问的前端,并通过代理
191191
前端的请求连接到后端。
@@ -299,7 +299,7 @@ cluster.
299299
The frontend and backend are now connected. You can hit the endpoint
300300
by using the curl command on the external IP of your frontend Service.
301301
-->
302-
### 通过前端发送流量
302+
### 通过前端发送流量 {#send-traffic-through-the-frontend}
303303

304304
前端和后端已经完成连接了。你可以使用 curl 命令通过你的前端 Service 的外部
305305
IP 访问服务端点。

content/zh-cn/docs/tasks/access-application-cluster/list-all-running-container-images.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ of Containers for each.
4545
- Use `sort` to sort the results
4646
- Use `uniq` to aggregate image counts
4747
-->
48-
## 列出所有命名空间下的所有容器镜像
48+
## 列出所有命名空间下的所有容器镜像 {#list-all-container-images-in-all-namespaces}
4949

5050
- 使用 `kubectl get pods --all-namespaces` 获取所有命名空间下的所有 Pod
5151
- 使用 `-o jsonpath={.items[*].spec.containers[*].image}` 来格式化输出,以仅包含容器镜像名称。
@@ -95,7 +95,7 @@ Pod is returned instead of a list of items.
9595
The formatting can be controlled further by using the `range` operation to
9696
iterate over elements individually.
9797
-->
98-
## 按 Pod 列出容器镜像
98+
## 按 Pod 列出容器镜像 {#list-container-images-by-pod}
9999

100100
可以使用 `range` 操作进一步控制格式化,以单独操作每个元素。
101101

@@ -110,7 +110,7 @@ sort
110110
To target only Pods matching a specific label, use the -l flag. The
111111
following matches only Pods with labels matching `app=nginx`.
112112
-->
113-
## 列出以标签过滤后的 Pod 的所有容器镜像
113+
## 列出以标签过滤后的 Pod 的所有容器镜像 {#list-container-images-filtering-by-pod-label}
114114

115115
要获取匹配特定标签的 Pod,请使用 -l 参数。以下匹配仅与标签 `app=nginx` 相符的 Pod。
116116

@@ -124,7 +124,7 @@ kubectl get pods --all-namespaces -o jsonpath="{.items[*].spec.containers[*].ima
124124
To target only pods in a specific namespace, use the namespace flag. The
125125
following matches only Pods in the `kube-system` namespace.
126126
-->
127-
## 列出以命名空间过滤后的 Pod 的所有容器镜像
127+
## 列出以命名空间过滤后的 Pod 的所有容器镜像 {#list-container-images-filtering-by-pod-namespace}
128128

129129
要获取匹配特定命名空间的 Pod,请使用 namespace 参数。以下仅匹配 `kube-system` 命名空间下的 Pod。
130130

@@ -138,7 +138,7 @@ kubectl get pods --namespace kube-system -o jsonpath="{.items[*].spec.containers
138138
As an alternative to jsonpath, Kubectl supports using [go-templates](https://pkg.go.dev/text/template)
139139
for formatting the output:
140140
-->
141-
## 使用 go-template 代替 jsonpath 来获取容器镜像
141+
## 使用 go-template 代替 jsonpath 来获取容器镜像 {#list-container-images-using-a-go-template-instead-of-jsonpath}
142142

143143
作为 jsonpath 的替代,Kubectl 支持使用 [go-templates](https://pkg.go.dev/text/template) 来格式化输出:
144144

@@ -154,7 +154,7 @@ kubectl get pods --all-namespaces -o go-template --template="{{range .items}}{{r
154154
* [Jsonpath](/docs/reference/kubectl/jsonpath/) reference guide
155155
* [Go template](https://pkg.go.dev/text/template) reference guide
156156
-->
157-
### 参考
157+
### 参考 {#reference}
158158

159159
* [Jsonpath](/zh-cn/docs/reference/kubectl/jsonpath/) 参考指南
160160
* [Go template](https://pkg.go.dev/text/template) 参考指南

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ for database debugging.
3636
3737
1. Create a Deployment that runs MongoDB:
3838
-->
39-
## 创建 MongoDB Deployment 和服务
39+
## 创建 MongoDB Deployment 和服务 {#creating-mongodb-deployment-and-service}
4040

4141
1. 创建一个运行 MongoDB 的 Deployment:
4242

@@ -183,7 +183,7 @@ for database debugging.
183183
184184
1. `kubectl port-forward` allows using resource name, such as a pod name, to select a matching pod to port forward to.
185185
-->
186-
## 转发一个本地端口到 Pod 端口
186+
## 转发一个本地端口到 Pod 端口 {#forward-a-local-port-to-a-port-on-the-pod}
187187

188188
1. `kubectl port-forward` 允许使用资源名称
189189
(例如 Pod 名称)来选择匹配的 Pod 来进行端口转发。
@@ -237,7 +237,7 @@ for database debugging.
237237
```
238238
Forwarding from 127.0.0.1:28015 -> 27017
239239
Forwarding from [::1]:28015 -> 27017
240-
```
240+
```
241241

242242
{{< note >}}
243243
<!--
@@ -257,7 +257,7 @@ for database debugging.
257257
```
258258

259259
<!--
260-
3. At the MongoDB command line prompt, enter the `ping` command:
260+
3. At the MongoDB command line prompt, enter the `ping` command:
261261
-->
262262
3. 在 MongoDB 命令行提示符下,输入 `ping` 命令:
263263

content/zh-cn/docs/tasks/access-application-cluster/web-ui-dashboard.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Dashboard 同时展示了 Kubernetes 集群中的资源状态信息和所有报
5656
5757
The Dashboard UI is not deployed by default. To deploy it, run the following command:
5858
-->
59-
## 部署 Dashboard UI
59+
## 部署 Dashboard UI {#deploying-the-dashboard-ui}
6060
默认情况下不会部署 Dashboard。可以通过以下命令部署:
6161

6262
```
@@ -71,7 +71,7 @@ Currently, Dashboard only supports logging in with a Bearer Token.
7171
To create a token for this demo, you can follow our guide on
7272
[creating a sample user](https://github.com/kubernetes/dashboard/blob/master/docs/user/access-control/creating-sample-user.md).
7373
-->
74-
## 访问 Dashboard 用户界面
74+
## 访问 Dashboard 用户界面 {#accessing-the-dashboard-ui}
7575

7676
为了保护你的集群数据,默认情况下,Dashboard 会使用最少的 RBAC 配置进行部署。
7777
当前,Dashboard 仅支持使用 Bearer 令牌登录。
@@ -92,7 +92,7 @@ The sample user created in the tutorial will have administrative privileges and
9292
You can enable access to the Dashboard using the `kubectl` command-line tool,
9393
by running the following command:
9494
-->
95-
### 命令行代理
95+
### 命令行代理 {#command-line-proxy}
9696

9797
你可以使用 `kubectl` 命令行工具来启用 Dashboard 访问,命令如下:
9898

@@ -121,7 +121,7 @@ Kubeconfig 身份验证方法**不**支持外部身份提供程序或基于 x509
121121
<!--
122122
## Welcome view
123123
-->
124-
## 欢迎界面
124+
## 欢迎界面 {#welcome-view}
125125

126126
<!--
127127
When you access Dashboard on an empty cluster, you'll see the welcome page.
@@ -145,7 +145,7 @@ In addition, you can view which system applications are running by default in th
145145
Dashboard lets you create and deploy a containerized application as a Deployment and optional Service with a simple wizard.
146146
You can either manually specify application details, or upload a YAML or JSON _manifest_ file containing application configuration.
147147
-->
148-
## 部署容器化应用
148+
## 部署容器化应用 {#deploying-containerized-applications}
149149

150150
通过一个简单的部署向导,你可以使用 Dashboard 将容器化应用作为一个 Deployment 和可选的
151151
Service 进行创建和部署。你可以手工指定应用的详细配置,或者上传一个包含应用配置的 YAML
@@ -161,7 +161,7 @@ Click the **CREATE** button in the upper right corner of any page to begin.
161161
162162
The deploy wizard expects that you provide the following information:
163163
-->
164-
### 指定应用的详细配置
164+
### 指定应用的详细配置 {#specifying-application-details}
165165

166166
部署向导需要你提供以下信息:
167167

@@ -380,7 +380,7 @@ Kubernetes supports declarative configuration.
380380
In this style, all configuration is stored in manifests (YAML or JSON configuration files).
381381
The manifests use Kubernetes [API](/docs/concepts/overview/kubernetes-api/) resource schemas.
382382
-->
383-
### 上传 YAML 或者 JSON 文件
383+
### 上传 YAML 或者 JSON 文件 {#uploading-a-yaml-or-json-file}
384384

385385
Kubernetes 支持声明式配置。所有的配置都存储在清单文件
386386
(YAML 或者 JSON 配置文件)中。这些
@@ -398,7 +398,7 @@ Dashboard 上传文件。
398398
399399
Following sections describe views of the Kubernetes Dashboard UI; what they provide and how can they be used.
400400
-->
401-
## 使用 Dashboard
401+
## 使用 Dashboard {#using-dashboard}
402402

403403
以下各节描述了 Kubernetes Dashboard UI 视图;包括它们提供的内容,以及怎么使用它们。
404404

@@ -409,7 +409,7 @@ When there are Kubernetes objects defined in the cluster, Dashboard shows them i
409409
By default only objects from the _default_ namespace are shown and
410410
this can be changed using the namespace selector located in the navigation menu.
411411
-->
412-
### 导航
412+
### 导航 {#navigation}
413413

414414
当在集群中定义 Kubernetes 对象时,Dashboard 会在初始视图中显示它们。
415415
默认情况下只会显示 _默认_ 名字空间中的对象,可以通过更改导航栏菜单中的名字空间筛选器进行改变。
@@ -427,7 +427,7 @@ Node list view contains CPU and memory usage metrics aggregated across all Nodes
427427
The details view shows the metrics for a Node, its specification, status,
428428
allocated resources, events and pods running on the node.
429429
-->
430-
#### 管理概述
430+
#### 管理概述 {#admin-overview}
431431

432432
集群和名字空间管理的视图,Dashboard 会列出节点、名字空间和持久卷,并且有它们的详细视图。
433433
节点列表视图包含从所有节点聚合的 CPU 和内存使用的度量值。
@@ -442,7 +442,7 @@ Each workload kind can be viewed separately.
442442
The lists summarize actionable information about the workloads,
443443
such as the number of ready pods for a ReplicaSet or current memory usage for a Pod.
444444
-->
445-
#### 负载
445+
#### 负载 {#workloads}
446446

447447
显示选中的名字空间中所有运行的应用。
448448
视图按照负载类型(例如:Deployment、ReplicaSet、StatefulSet)罗列应用,并且每种负载都可以单独查看。
@@ -465,7 +465,7 @@ discovering them within a cluster.
465465
For that reason, Service and Ingress views show Pods targeted by them,
466466
internal endpoints for cluster connections and external endpoints for external users.
467467
-->
468-
#### 服务
468+
#### 服务 {#services}
469469

470470
展示允许暴露给外网服务和允许集群内部发现的 Kubernetes 资源。
471471
因此,Service 和 Ingress 视图展示他们关联的 Pod、给集群连接使用的内部端点和给外部用户使用的外部端点。
@@ -475,7 +475,7 @@ internal endpoints for cluster connections and external endpoints for external u
475475
476476
Storage view shows PersistentVolumeClaim resources which are used by applications for storing data.
477477
-->
478-
#### 存储
478+
#### 存储 {#storage}
479479

480480
存储视图展示持久卷申领(PVC)资源,这些资源被应用程序用来存储数据。
481481

@@ -496,7 +496,7 @@ The view allows for editing and managing config objects and displays secrets hid
496496
Pod lists and detail pages link to a logs viewer that is built into Dashboard.
497497
The viewer allows for drilling down logs from containers belonging to a single Pod.
498498
-->
499-
#### 日志查看器
499+
#### 日志查看器 {#logs-viewer}
500500

501501
Pod 列表和详细信息页面可以链接到 Dashboard 内置的日志查看器。
502502
查看器可以深入查看属于同一个 Pod 的不同容器的日志。

0 commit comments

Comments
 (0)