Skip to content

Commit ea1bd89

Browse files
authored
Merge pull request #37900 from windsonsea/convols
[zh] sync configure-volume-storage.md
2 parents 0a0126e + 22633aa commit ea1bd89

File tree

1 file changed

+36
-24
lines changed

1 file changed

+36
-24
lines changed

content/zh-cn/docs/tasks/configure-pod-container/configure-volume-storage.md

Lines changed: 36 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ applications, such as key-value stores (such as Redis) and databases.
3131

3232
<!-- steps -->
3333

34-
3534
<!--
3635
## Configure a volume for a Pod
3736
@@ -59,25 +58,30 @@ restarts. Here is the configuration file for the Pod:
5958
```
6059

6160
<!--
62-
1.Verify that the Pod's Container is running, and then watch for changes to the Pod:
61+
1. Verify that the Pod's Container is running, and then watch for changes to
62+
the Pod:
6363
-->
6464
2. 验证 Pod 中的容器是否正在运行,然后留意 Pod 的更改:
6565

6666
```shell
6767
kubectl get pod redis --watch
6868
```
6969

70+
<!--
71+
The output looks like this:
72+
-->
73+
7074
输出如下:
7175

72-
```shell
76+
```console
7377
NAME READY STATUS RESTARTS AGE
7478
redis 1/1 Running 0 13s
7579
```
7680

7781
<!--
78-
1.In another terminal, get a shell to the running Container:
82+
1. In another terminal, get a shell to the running Container:
7983
-->
80-
3. 在另一个终端,用 shell 连接正在运行的容器:
84+
3. 在另一个终端,用 Shell 连接正在运行的容器:
8185

8286
```shell
8387
kubectl exec -it redis -- /bin/bash
@@ -86,15 +90,15 @@ restarts. Here is the configuration file for the Pod:
8690
<!--
8791
1.In your shell, go to `/data/redis`, and then create a file:
8892
-->
89-
4. 在你的 Shell中,切换到 `/data/redis` 目录下,然后创建一个文件:
93+
4. 在你的 Shell 中,切换到 `/data/redis` 目录下,然后创建一个文件:
9094

9195
```shell
9296
root@redis:/data# cd /data/redis/
9397
root@redis:/data/redis# echo Hello > test-file
9498
```
9599

96100
<!--
97-
1.In your shell, list the running processes:
101+
1. In your shell, list the running processes:
98102
-->
99103
5. 在你的 Shell 中,列出正在运行的进程:
100104

@@ -104,33 +108,41 @@ restarts. Here is the configuration file for the Pod:
104108
root@redis:/data/redis# ps aux
105109
```
106110

111+
<!--
112+
The output is similar to this:
113+
-->
114+
107115
输出类似于:
108116

109-
```shell
117+
```console
110118
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
111119
redis 1 0.1 0.1 33308 3828 ? Ssl 00:46 0:00 redis-server *:6379
112120
root 12 0.0 0.0 20228 3020 ? Ss 00:47 0:00 /bin/bash
113121
root 15 0.0 0.0 17500 2072 ? R+ 00:48 0:00 ps aux
114122
```
115123

116124
<!--
117-
1.In your shell, kill the Redis process:
125+
1. In your shell, kill the Redis process:
118126
-->
119127
6. 在你的 Shell 中,结束 Redis 进程:
120128

121129
```shell
122130
root@redis:/data/redis# kill <pid>
123131
```
124132

133+
<!--
134+
where `<pid>` is the Redis process ID (PID).
135+
-->
136+
125137
其中 `<pid>` 是 Redis 进程的 ID (PID)。
126138

127139
<!--
128140
1. In your original terminal, watch for changes to the Redis Pod. Eventually,
129-
you will see something like this:
141+
you will see something like this:
130142
-->
131143
7. 在你原先终端中,留意 Redis Pod 的更改。最终你将会看到和下面类似的输出:
132144

133-
```shell
145+
```console
134146
NAME READY STATUS RESTARTS AGE
135147
redis 1/1 Running 0 13s
136148
redis 0/1 Completed 0 6m
@@ -148,7 +160,7 @@ of `Always`.
148160
`Always`
149161

150162
<!--
151-
1.Get a shell into the restarted Container:
163+
1. Get a shell into the restarted Container:
152164
-->
153165
1. 用 Shell 进入重新启动的容器中:
154166

@@ -157,7 +169,7 @@ of `Always`.
157169
```
158170

159171
<!--
160-
1.In your shell, goto `/data/redis`, and verify that `test-file` is still there.
172+
1. In your shell, go to `/data/redis`, and verify that `test-file` is still there.
161173
-->
162174
2. 在你的 Shell 中,进入到 `/data/redis` 目录下,并确认 `test-file` 文件是否仍然存在。
163175

@@ -168,7 +180,7 @@ of `Always`.
168180
```
169181

170182
<!--
171-
1.Delete the Pod that you created for this exercise:
183+
1. Delete the Pod that you created for this exercise:
172184
-->
173185
3. 删除为此练习所创建的 Pod:
174186

@@ -179,19 +191,19 @@ of `Always`.
179191
## {{% heading "whatsnext" %}}
180192

181193
<!--
182-
* See [Volume](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#volume-v1-core).
194+
- See [Volume](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#volume-v1-core).
183195
184-
* See [Pod](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#pod-v1-core).
196+
- See [Pod](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#pod-v1-core).
185197
186-
* In addition to the local disk storage provided by `emptyDir`, Kubernetes
187-
supports many different network-attached storage solutions, including PD on
188-
GCE and EBS on EC2, which are preferred for critical data and will handle
189-
details such as mounting and unmounting the devices on the nodes. See
190-
[Volumes](/docs/concepts/storage/volumes/) for more details.
198+
- In addition to the local disk storage provided by `emptyDir`, Kubernetes
199+
supports many different network-attached storage solutions, including PD on
200+
GCE and EBS on EC2, which are preferred for critical data and will handle
201+
details such as mounting and unmounting the devices on the nodes. See
202+
[Volumes](/docs/concepts/storage/volumes/) for more details.
191203
-->
192-
* 参阅 [Volume](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#volume-v1-core)。
193-
* 参阅 [Pod](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#pod-v1-core)。
194-
* 除了 `emptyDir` 提供的本地磁盘存储外,Kubernetes 还支持许多不同的网络附加存储解决方案,
204+
- 参阅 [Volume](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#volume-v1-core)。
205+
- 参阅 [Pod](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#pod-v1-core)。
206+
- 除了 `emptyDir` 提供的本地磁盘存储外,Kubernetes 还支持许多不同的网络附加存储解决方案,
195207
包括 GCE 上的 PD 和 EC2 上的 EBS,它们是关键数据的首选,并将处理节点上的一些细节,
196208
例如安装和卸载设备。了解更多详情请参阅[](/zh-cn/docs/concepts/storage/volumes/)
197209

0 commit comments

Comments
 (0)