Skip to content

Commit 0f86b1a

Browse files
authored
Merge pull request #20169 from tanjunchen/fix-zh-url
replace zh to /zh in content/zh/docs/tutorials/ directory
2 parents 5888082 + cb5a3cd commit 0f86b1a

File tree

11 files changed

+374
-382
lines changed

11 files changed

+374
-382
lines changed

content/zh/docs/tutorials/_index.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ content_template: templates/concept
1616

1717
{{% capture overview %}}
1818

19-
Kubernetes 文档的这一部分包含教程。一个教程展示了如何完成一个比单个[任务](zh/docs/tasks/)更大的目标。
19+
Kubernetes 文档的这一部分包含教程。一个教程展示了如何完成一个比单个[任务](/zh/docs/tasks/)更大的目标。
2020
通常一个教程有几个部分,每个部分都有一系列步骤。在浏览每个教程之前,
21-
您可能希望将[标准化术语表](zh/docs/reference/glossary/)页面添加到书签,供以后参考。
21+
您可能希望将[标准化术语表](/zh/docs/reference/glossary/)页面添加到书签,供以后参考。
2222

2323
<!--
2424
This section of the Kubernetes documentation contains tutorials.
2525
A tutorial shows how to accomplish a goal that is larger than a single
26-
[task](zh/docs/tasks/). Typically a tutorial has several sections,
26+
[task](/docs/tasks/). Typically a tutorial has several sections,
2727
each of which has a sequence of steps.
2828
Before walking through each tutorial, you may want to bookmark the
29-
[Standardized Glossary](zh/docs/reference/glossary/) page for later references.
29+
[Standardized Glossary](/docs/reference/glossary/) page for later references.
3030
-->
3131

3232
{{% /capture %}}
@@ -39,10 +39,10 @@ Before walking through each tutorial, you may want to bookmark the
3939
## Basics
4040
-->
4141

42-
* [Kubernetes 基础知识](zh/docs/tutorials/Kubernetes-Basics/)是一个深入的交互式教程,帮助您理解 Kubernetes 系统,并尝试一些基本的 Kubernetes 特性。
42+
* [Kubernetes 基础知识](/zh/docs/tutorials/Kubernetes-Basics/)是一个深入的交互式教程,帮助您理解 Kubernetes 系统,并尝试一些基本的 Kubernetes 特性。
4343

4444
<!--
45-
* [Kubernetes Basics](zh/docs/tutorials/kubernetes-basics/) is an in-depth interactive tutorial that helps you understand the Kubernetes system and try out some basic Kubernetes features.
45+
* [Kubernetes Basics](/docs/tutorials/kubernetes-basics/) is an in-depth interactive tutorial that helps you understand the Kubernetes system and try out some basic Kubernetes features.
4646
-->
4747

4848
* [使用 Kubernetes (Udacity) 的可伸缩微服务](https://www.udacity.com/course/scalable-microservices-with-kubernetes--ud615)
@@ -57,10 +57,10 @@ Before walking through each tutorial, you may want to bookmark the
5757
* [Introduction to Kubernetes (edX)](https://www.edx.org/course/introduction-kubernetes-linuxfoundationx-lfs158x#)
5858
-->
5959

60-
* [你好 Minikube](zh/docs/tutorials/hello-minikube/)
60+
* [你好 Minikube](/zh/docs/tutorials/hello-minikube/)
6161

6262
<!--
63-
* [Hello Minikube](zh/docs/tutorials/hello-minikube/)
63+
* [Hello Minikube]/docs/tutorials/hello-minikube/)
6464
-->
6565

6666
## 配置
@@ -69,10 +69,10 @@ Before walking through each tutorial, you may want to bookmark the
6969
## Configuration
7070
-->
7171

72-
* [使用一个 ConfigMap 配置 Redis](zh/docs/tutorials/configuration/configure-redis-using-configmap/)
72+
* [使用一个 ConfigMap 配置 Redis](/zh/docs/tutorials/configuration/configure-redis-using-configmap/)
7373

7474
<!--
75-
* [Configuring Redis Using a ConfigMap](zh/docs/tutorials/configuration/configure-redis-using-configmap/)
75+
* [Configuring Redis Using a ConfigMap](/docs/tutorials/configuration/configure-redis-using-configmap/)
7676
-->
7777

7878
## 无状态应用程序
@@ -81,16 +81,16 @@ Before walking through each tutorial, you may want to bookmark the
8181
## Stateless Applications
8282
-->
8383

84-
* [公开外部 IP 地址访问集群中的应用程序](zh/docs/tutorials/stateless-application/expose-external-ip-address/)
84+
* [公开外部 IP 地址访问集群中的应用程序](/zh/docs/tutorials/stateless-application/expose-external-ip-address/)
8585

8686
<!--
87-
* [Exposing an External IP Address to Access an Application in a Cluster](zh/docs/tutorials/stateless-application/expose-external-ip-address/)
87+
* [Exposing an External IP Address to Access an Application in a Cluster](/docs/tutorials/stateless-application/expose-external-ip-address/)
8888
-->
8989

90-
* [示例:使用 Redis 部署 PHP 留言板应用程序](zh/docs/tutorials/stateless-application/guestbook/)
90+
* [示例:使用 Redis 部署 PHP 留言板应用程序](/zh/docs/tutorials/stateless-application/guestbook/)
9191

9292
<!--
93-
* [Example: Deploying PHP Guestbook application with Redis](zh/docs/tutorials/stateless-application/guestbook/)
93+
* [Example: Deploying PHP Guestbook application with Redis](/docs/tutorials/stateless-application/guestbook/)
9494
-->
9595

9696
## 有状态应用程序
@@ -99,28 +99,28 @@ Before walking through each tutorial, you may want to bookmark the
9999
## Stateful Applications
100100
-->
101101

102-
* [StatefulSet 基础](zh/docs/tutorials/stateful-application/basic-stateful-set/)
102+
* [StatefulSet 基础](/zh/docs/tutorials/stateful-application/basic-stateful-set/)
103103

104104
<!--
105-
* [StatefulSet Basics](zh/docs/tutorials/stateful-application/basic-stateful-set/)
105+
* [StatefulSet Basics](/docs/tutorials/stateful-application/basic-stateful-set/)
106106
-->
107107

108-
* [示例:WordPress 和 MySQL 使用持久卷](zh/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/)
108+
* [示例:WordPress 和 MySQL 使用持久卷](/zh/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/)
109109

110110
<!--
111-
* [Example: WordPress and MySQL with Persistent Volumes](zh/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/)
111+
* [Example: WordPress and MySQL with Persistent Volumes](/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/)
112112
-->
113113

114-
* [示例:使用有状态集部署 Cassandra](zh/docs/tutorials/stateful-application/cassandra/)
114+
* [示例:使用有状态集部署 Cassandra](/zh/docs/tutorials/stateful-application/cassandra/)
115115

116116
<!--
117-
* [Example: Deploying Cassandra with Stateful Sets](zh/docs/tutorials/stateful-application/cassandra/)
117+
* [Example: Deploying Cassandra with Stateful Sets](/docs/tutorials/stateful-application/cassandra/)
118118
-->
119119

120-
* [运行 ZooKeeper,CP 分布式系统](zh/docs/tutorials/stateful-application/zookeeper/)
120+
* [运行 ZooKeeper,CP 分布式系统](/zh/docs/tutorials/stateful-application/zookeeper/)
121121

122122
<!--
123-
* [Running ZooKeeper, A CP Distributed System](zh/docs/tutorials/stateful-application/zookeeper/)
123+
* [Running ZooKeeper, A CP Distributed System](/docs/tutorials/stateful-application/zookeeper/)
124124
-->
125125

126126
## CI/CD 管道
@@ -155,33 +155,33 @@ Before walking through each tutorial, you may want to bookmark the
155155

156156
## 集群
157157

158-
* [AppArmor](zh/docs/tutorials/clusters/apparmor/)
158+
* [AppArmor](/zh/docs/tutorials/clusters/apparmor/)
159159

160160
<!--
161161
## Clusters
162162
163-
* [AppArmor](zh/docs/tutorials/clusters/apparmor/)
163+
* [AppArmor](/docs/tutorials/clusters/apparmor/)
164164
-->
165165

166166
## 服务
167167

168-
* [使用源 IP](zh/docs/tutorials/services/source-ip/)
168+
* [使用源 IP](/zh/docs/tutorials/services/source-ip/)
169169

170170
<!--
171171
## Services
172172
173-
* [Using Source IP](zh/docs/tutorials/services/source-ip/)
173+
* [Using Source IP](/docs/tutorials/services/source-ip/)
174174
-->
175175

176176
{{% /capture %}}
177177

178178
{{% capture whatsnext %}}
179179

180-
如果您想编写教程,请参阅[使用页面模板](zh/docs/home/contribute/page-templates/)
180+
如果您想编写教程,请参阅[使用页面模板](/zh/docs/home/contribute/page-templates/)
181181
以获取有关教程页面类型和教程模板的信息。
182182
<!--
183183
If you would like to write a tutorial, see
184-
[Using Page Templates](zh/docs/home/contribute/page-templates/)
184+
[Using Page Templates](/docs/home/contribute/page-templates/)
185185
for information about the tutorial page type and the tutorial template.
186186
-->
187187

content/zh/docs/tutorials/clusters/apparmor.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Apparmor 是一个 Linux 内核安全模块,它补充了标准的基于 Linux
8888
kernel, including patches that add additional hooks and features. Kubernetes has only been
8989
tested with the upstream version, and does not promise support for other features.
9090
{{< /note >}} -->
91-
2. AppArmor 内核模块已启用 -- 要使 Linux 内核强制执行 AppArmor 配置文件,必须安装并且启动 AppArmor 内核模块。默认情况下,有几个发行版支持该模块,如 Ubuntu 和 SUSE,还有许多发行版提供可选支持。要检查模块是否已启用,请检查
91+
2. AppArmor 内核模块已启用 -- 要使 Linux 内核强制执行 AppArmor 配置文件,必须安装并且启动 AppArmor 内核模块。默认情况下,有几个发行版支持该模块,如 Ubuntu 和 SUSE,还有许多发行版提供可选支持。要检查模块是否已启用,请检查
9292
`/sys/module/apparmor/parameters/enabled` 文件:
9393
```shell
9494
cat /sys/module/apparmor/parameters/enabled
@@ -416,7 +416,7 @@ Events:
416416
nodes. There are lots of ways to setup the profiles though, such as: -->
417417
Kubernetes 目前不提供任何本地机制来将 AppArmor 配置文件加载到节点上。有很多方法可以设置配置文件,例如:
418418

419-
<!-- * Through a [DaemonSet](/zh/docs/concepts/workloads/controllers/daemonset/) that runs a Pod on each node to
419+
<!-- * Through a [DaemonSet](/docs/concepts/workloads/controllers/daemonset/) that runs a Pod on each node to
420420
ensure the correct profiles are loaded. An example implementation can be found
421421
[here](https://git.k8s.io/kubernetes/test/images/apparmor-loader).
422422
* At node initialization time, using your node initialization scripts (e.g. Salt, Ansible, etc.) or
@@ -430,7 +430,7 @@ Kubernetes 目前不提供任何本地机制来将 AppArmor 配置文件加载
430430
<!-- The scheduler is not aware of which profiles are loaded onto which node, so the full set of profiles
431431
must be loaded onto every node. An alternative approach is to add a node label for each profile (or
432432
class of profiles) on the node, and use a
433-
[node selector](/zh/docs/concepts/configuration/assign-pod-node/) to ensure the Pod is run on a
433+
[node selector](/docs/concepts/configuration/assign-pod-node/) to ensure the Pod is run on a
434434
node with the required profile. -->
435435
调度程序不知道哪些配置文件加载到哪个节点上,因此必须将全套配置文件加载到每个节点上。另一种方法是为节点上的每个配置文件(或配置文件类)添加节点标签,并使用[节点选择器](/zh/docs/concepts/configuration/assign pod node/)确保 Pod 在具有所需配置文件的节点上运行。
436436

@@ -525,7 +525,7 @@ logs or through `journalctl`. More information is provided in
525525
想要调试 AppArmor 的问题,您可以检查系统日志,查看具体拒绝了什么。AppArmor 将详细消息记录到 `dmesg` ,错误通常可以在系统日志中或通过 `journalctl` 找到。更多详细信息见[AppArmor 失败](https://gitlab.com/apparmor/apparmor/wikis/AppArmor_Failures)
526526

527527
<!-- ## API Reference -->
528-
## API 参考
528+
## API 参考
529529

530530
<!-- ### Pod Annotation -->
531531
### Pod 注释

content/zh/docs/tutorials/configuration/configure-redis-using-configmap.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ content_template: templates/tutorial
99
{{% capture overview %}}
1010

1111
<!--
12-
This page provides a real world example of how to configure Redis using a ConfigMap and builds upon the [Configure Containers Using a ConfigMap](/zh/docs/tasks/configure-pod-container/configure-pod-configmap/) task.
12+
This page provides a real world example of how to configure Redis using a ConfigMap and builds upon the [Configure Containers Using a ConfigMap](/docs/tasks/configure-pod-container/configure-pod-configmap/) task.
1313
-->
1414
这篇文档基于[使用 ConfigMap 来配置 Containers](/zh/docs/tasks/configure-pod-container/configure-pod-configmap/) 这个任务,提供了一个使用 ConfigMap 来配置 Redis 的真实案例。
1515

@@ -40,7 +40,7 @@ This page provides a real world example of how to configure Redis using a Config
4040
* {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
4141
<!--
4242
* The example shown on this page works with `kubectl` 1.14 and above.
43-
* Understand [Configure Containers Using a ConfigMap](/zh/docs/tasks/configure-pod-container/configure-pod-configmap/).
43+
* Understand [Configure Containers Using a ConfigMap](/docs/tasks/configure-pod-container/configure-pod-configmap/).
4444
-->
4545
* 此页面上显示的示例适用于 `kubectl` 1.14和在其以上的版本。
4646
* 理解[使用ConfigMap来配置Containers](/zh/docs/tasks/configure-pod-container/configure-pod-configmap/)
@@ -77,8 +77,8 @@ configMapGenerator:
7777
EOF
7878
```
7979

80-
<!--
81-
Add the pod resource config to the `kustomization.yaml`:
80+
<!--
81+
Add the pod resource config to the `kustomization.yaml`:
8282
-->
8383
将 pod 的资源配置添加到 `kustomization.yaml` 文件中:
8484

@@ -93,17 +93,17 @@ resources:
9393
EOF
9494
```
9595

96-
<!--
97-
Apply the kustomization directory to create both the ConfigMap and Pod objects:
96+
<!--
97+
Apply the kustomization directory to create both the ConfigMap and Pod objects:
9898
-->
9999
应用整个 kustomization 文件夹以创建 ConfigMap 和 Pod 对象:
100100

101101
```shell
102102
kubectl apply -k .
103103
```
104104

105-
<!--
106-
Examine the created objects by
105+
<!--
106+
Examine the created objects by
107107
-->
108108
使用以下命令检查创建的对象
109109

@@ -116,20 +116,20 @@ NAME READY STATUS RESTARTS AGE
116116
pod/redis 1/1 Running 0 52s
117117
```
118118

119-
<!--
119+
<!--
120120
In the example, the config volume is mounted at `/redis-master`.
121121
It uses `path` to add the `redis-config` key to a file named `redis.conf`.
122122
The file path for the redis config, therefore, is `/redis-master/redis.conf`.
123-
This is where the image will look for the config file for the redis master.
123+
This is where the image will look for the config file for the redis master.
124124
-->
125125
在示例中,配置卷挂载在 `/redis-master` 下。
126126
它使用 `path``redis-config` 密钥添加到名为 `redis.conf` 的文件中。
127127
因此,redis配置的文件路径为 `/redis-master/redis.conf`
128128
这是镜像将在其中查找 redis master 的配置文件的位置。
129129

130-
<!--
130+
<!--
131131
Use `kubectl exec` to enter the pod and run the `redis-cli` tool to verify that
132-
the configuration was correctly applied:
132+
the configuration was correctly applied:
133133
-->
134134
使用 `kubectl exec` 进入 pod 并运行 `redis-cli` 工具来验证配置已正确应用:
135135

@@ -143,8 +143,8 @@ kubectl exec -it redis redis-cli
143143
2) "allkeys-lru"
144144
```
145145

146-
<!--
147-
Delete the created pod:
146+
<!--
147+
Delete the created pod:
148148
-->
149149
删除创建的 pod:
150150
```shell
@@ -155,8 +155,8 @@ kubectl delete pod redis
155155

156156
{{% capture whatsnext %}}
157157

158-
<!--
159-
* Learn more about [ConfigMaps](/zh/docs/tasks/configure-pod-container/configure-pod-configmap/).
158+
<!--
159+
* Learn more about [ConfigMaps](/docs/tasks/configure-pod-container/configure-pod-configmap/).
160160
-->
161161
* 了解有关 [ConfigMaps](/zh/docs/tasks/configure-pod-container/configure-pod-configmap/)的更多信息。
162162

0 commit comments

Comments
 (0)