Skip to content

Commit 92f9c2a

Browse files
authored
Merge pull request #42168 from asa3311/sync-zh-33
[zh] sync configure-persistent-volume-storage kubeadm-certs feature-gates-removed working-with-objects/_index.md
2 parents 9fc3816 + aacdde3 commit 92f9c2a

File tree

3 files changed

+29
-18
lines changed

3 files changed

+29
-18
lines changed

content/zh-cn/docs/concepts/overview/working-with-objects/_index.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,14 @@ detail the structure of that `.status` field, and its content for each different
235235
不同类型的对象可以有不同的 `.status` 信息。API 参考页面给出了 `.status` 字段的详细结构,
236236
以及针对不同类型 API 对象的具体内容。
237237

238+
{{< note >}}
239+
<!--
240+
See [Configuration Best Practices](/docs/concepts/configuration/overview/) for additional
241+
information on writing YAML configuration files.
242+
-->
243+
请查看[配置最佳实践](/zh-cn/docs/concepts/configuration/overview/)来获取有关编写 YAML 配置文件的更多信息。
244+
{{< /note >}}
245+
238246
<!--
239247
## Server side field validation
240248

content/zh-cn/docs/tasks/administer-cluster/kubeadm/kubeadm-certs.md

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -238,11 +238,11 @@ kubeadm 在 1.17 版本之前有一个[缺陷](https://github.com/kubernetes/kub
238238
<!--
239239
## Manual certificate renewal
240240

241-
You can renew your certificates manually at any time with the `kubeadm certs renew` command.
241+
You can renew your certificates manually at any time with the `kubeadm certs renew` command, with the appropriate command line options.
242242
-->
243243
## 手动更新证书 {#manual-certificate-renewal}
244244

245-
你能随时通过 `kubeadm certs renew` 命令手动更新你的证书。
245+
你能随时通过 `kubeadm certs renew` 命令手动更新你的证书,只需带上合适的命令行选项
246246

247247
<!--
248248
This command performs the renewal using CA (or front-proxy-CA) certificate and key stored in `/etc/kubernetes/pki`.
@@ -286,26 +286,29 @@ to keep them both in sync.
286286
{{< /note >}}
287287

288288
<!--
289-
`kubeadm certs renew` provides the following options:
289+
`kubeadm certs renew` can renew any specific certificate or, with the subcommand `all`, it can renew all of them, as shown below:
290290
-->
291-
`kubeadm certs renew` 提供以下选项:
291+
`kubeadm certs renew` 可以更新任何特定的证书,或者使用子命令 `all`
292+
更新所有的证书,如下所示:
292293

293-
<!--
294-
- The Kubernetes certificates normally reach their expiration date after one year.
295-
-->
296-
- Kubernetes 证书通常在一年后到期。
294+
```shell
295+
kubeadm certs renew all
296+
```
297297

298+
{{< note >}}
298299
<!--
299-
- `--csr-only` can be used to renew certificates with an external CA by generating certificate
300-
signing requests (without actually renewing certificates in place); see next paragraph for more
301-
information.
302-
303-
- It's also possible to renew a single certificate instead of all.
300+
Clusters built with kubeadm often copy the `admin.conf` certificate into `$HOME/.kube/config`, as instructed in [Creating a cluster with kubeadm](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/). On such a system, to update the contents of `$HOME/.kube/config` after renewing the `admin.conf` you must run the following commands:
304301
-->
305-
- `--csr-only` 可用于经过一个外部 CA 生成的证书签名请求来更新证书(无需实际替换更新证书);
306-
更多信息请参见下节。
302+
使用 kubeadm 构建的集群通常会将 `admin.conf` 证书复制到 `$HOME/.kube/config` 中,
303+
如[使用 kubeadm 创建集群](/zh-cn/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/)中所指示的那样。
304+
在这样的系统中,为了在更新 `admin.conf` 后更新 `$HOME/.kube/config` 的内容,
305+
你必须运行以下命令:
307306

308-
- 可以更新单个证书而不是全部证书。
307+
```shell
308+
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
309+
sudo chown $(id -u):$(id -g) $HOME/.kube/config
310+
```
311+
{{< /note >}}
309312

310313
<!--
311314
## Renew certificates with the Kubernetes certificates API

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ task-pv-volume 10Gi RWO Retain Available
214214
The next step is to create a PersistentVolumeClaim. Pods use PersistentVolumeClaims
215215
to request physical storage. In this exercise, you create a PersistentVolumeClaim
216216
that requests a volume of at least three gibibytes that can provide read-write
217-
access for at least one Node.
217+
access for at most one Node at a time.
218218
219219
Here is the configuration file for the PersistentVolumeClaim:
220220
-->
@@ -223,7 +223,7 @@ Here is the configuration file for the PersistentVolumeClaim:
223223
下一步是创建一个 PersistentVolumeClaim。
224224
Pod 使用 PersistentVolumeClaim 来请求物理存储。
225225
在本练习中,你将创建一个 PersistentVolumeClaim,它请求至少 3 GB 容量的卷,
226-
该卷至少可以为一个节点提供读写访问
226+
该卷一次最多可以为一个节点提供读写访问
227227

228228
下面是 PersistentVolumeClaim 的配置文件:
229229

0 commit comments

Comments
 (0)