Skip to content

Commit 73a0302

Browse files
[zh] docs: update old command and sync
Signed-off-by: zhangguanzhang <[email protected]>
1 parent a674161 commit 73a0302

File tree

1 file changed

+22
-14
lines changed

1 file changed

+22
-14
lines changed

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

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ You can use the `check-expiration` subcommand to check when certificates expire:
9999
你可以使用 `check-expiration` 子命令来检查证书何时过期
100100

101101
```shell
102-
kubeadm alpha certs check-expiration
102+
kubeadm certs check-expiration
103103
```
104104

105105
<!--
@@ -147,10 +147,18 @@ Additionally, kubeadm informs the user if the certificate is externally managed;
147147
{{< /warning >}}
148148

149149
<!--
150-
`kubelet.conf` is not included in the list above because kubeadm configures kubelet for automatic certificate renewal.
150+
`kubelet.conf` is not included in the list above because kubeadm configures kubelet
151+
for [automatic certificate renewal](/docs/tasks/tls/certificate-rotation/)
152+
with rotatable certificates under `/var/lib/kubelet/pki`.
153+
To repair an expired kubelet client certificate see
154+
[Kubelet client certificate rotation fails](/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm/#kubelet-client-cert).
151155
-->
152156
{{< note >}}
153-
上面的列表中没有包含 `kubelet.conf` 因为 kubeadm 将 kubelet 配置为自动更新证书。
157+
上面的列表中没有包含 `kubelet.conf`,因为 kubeadm 将 kubelet 配置为
158+
[自动更新证书](/docs/tasks/tls/certificate-rotation/)
159+
轮换的证书位于目录 `/var/lib/kubelet/pki`
160+
要修复过期的 kubelet 客户端证书,请参阅
161+
[kubelet 客户端证书轮换失败](/zh/docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm/#kubelet-client-cert)
154162
{{< /note >}}
155163

156164
<!--
@@ -219,11 +227,11 @@ kubeadm 在 1.17 版本之前有一个[缺陷](https://github.com/kubernetes/kub
219227
<!--
220228
## Manual certificate renewal
221229

222-
You can renew your certificates manually at any time with the `kubeadm alpha certs renew` command.
230+
You can renew your certificates manually at any time with the `kubeadm certs renew` command.
223231
-->
224232
## 手动更新证书
225233

226-
你能随时通过 `kubeadm alpha certs renew` 命令手动更新你的证书。
234+
你能随时通过 `kubeadm certs renew` 命令手动更新你的证书。
227235

228236
<!--
229237
This command performs the renewal using CA (or front-proxy-CA) certificate and key stored in `/etc/kubernetes/pki`.
@@ -246,7 +254,7 @@ If you are running an HA cluster, this command needs to be executed on all the c
246254
{{< /note >}}
247255

248256
<!--
249-
`kubeadm alpha certs renew` provides the following options:
257+
`kubeadm certs renew` provides the following options:
250258
-->
251259
`kubeadm certs renew`提供以下选项:
252260

@@ -303,10 +311,10 @@ Kubernetes 证书颁发机构不是开箱即用。
303311
要激活内置签名者,请传递 `--cluster-signing-cert-file` 和 `--cluster-signing-key-file` 参数。
304312

305313
<!--
306-
If you're creating a new cluster, you can use a kubeadm [configuration file](https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta2):
314+
If you're creating a new cluster, you can use a kubeadm [configuration file](/docs/reference/config-api/kubeadm-config.v1beta2/):
307315
-->
308316
如果你正在创建一个新的集群,你可以使用 kubeadm 的
309-
[配置文件](https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta2)。
317+
[配置文件](/docs/reference/config-api/kubeadm-config.v1beta2/)。
310318

311319
```yaml
312320
apiVersion: kubeadm.k8s.io/v1beta2
@@ -331,7 +339,7 @@ See [Create CertificateSigningRequest](/docs/reference/access-authn-authz/certif
331339
<!--
332340
## Renew certificates with external CA
333341

334-
This section provide more details about how to execute manual certificate renewal using an external CA.
342+
This section provides more details about how to execute manual certificate renewal using an external CA.
335343
-->
336344
## 通过外部 CA 更新证书
337345

@@ -349,15 +357,15 @@ CSR 表示向 CA 请求客户的签名证书。
349357
<!--
350358
### Create certificate signing requests (CSR)
351359

352-
You can create certificate signing requests with `kubeadm alpha certs renew --csr-only`.
360+
You can create certificate signing requests with `kubeadm certs renew --csr-only`.
353361

354362
Both the CSR and the accompanying private key are given in the output.
355363
You can pass in a directory with `--csr-dir` to output the CSRs to the specified location.
356364
If `--csr-dir` is not specified, the default certificate directory (`/etc/kubernetes/pki`) is used.
357365
-->
358366
### 创建证书签名请求 (CSR)
359367

360-
你可以通过 `kubeadm alpha certs renew --csr-only` 命令创建证书签名请求。
368+
你可以通过 `kubeadm certs renew --csr-only` 命令创建证书签名请求。
361369

362370
CSR 和随附的私钥都在输出中给出。
363371
你可以传入一个带有 `--csr-dir` 的目录,将 CRS 输出到指定位置。
@@ -444,7 +452,7 @@ serverTLSBootstrap: true
444452
<!--
445453
If you have already created the cluster you must adapt it by doing the following:
446454
- Find and edit the `kubelet-config-{{< skew latestVersion >}}` ConfigMap in the `kube-system` namespace.
447-
In that ConfigMap, the `config` key has a
455+
In that ConfigMap, the `kubelet` key has a
448456
[KubeletConfiguration](/docs/reference/config-api/kubelet-config.v1beta1/#kubelet-config-k8s-io-v1beta1-KubeletConfiguration)
449457
document as its value. Edit the KubeletConfiguration document to set `serverTLSBootstrap: true`.
450458
- On each node, add the `serverTLSBootstrap: true` field in `/var/lib/kubelet/config.yaml`
@@ -454,7 +462,7 @@ and restart the kubelet with `systemctl restart kubelet`
454462

455463
- 找到 `kube-system` 名字空间中名为 `kubelet-config-{{< skew latestVersion >}}`
456464
的 ConfigMap 并编辑之。
457-
在该 ConfigMap 中,`config` 键下面有一个
465+
在该 ConfigMap 中,`kubelet` 键下面有一个
458466
[KubeletConfiguration](/zh/docs/reference/config-api/kubelet-config.v1beta1/#kubelet-config-k8s-io-v1beta1-KubeletConfiguration)
459467
文档作为其取值。编辑该 KubeletConfiguration 文档以设置
460468
`serverTLSBootstrap: true`。
@@ -467,7 +475,7 @@ The field `serverTLSBootstrap: true` will enable the bootstrap of kubelet servin
467475
certificates by requesting them from the `certificates.k8s.io` API. One known limitation
468476
is that the CSRs (Certificate Signing Requests) for these certificates cannot be automatically
469477
approved by the default signer in the kube-controller-manager -
470-
[`kubernetes.io/kubelet-serving`](https://kubernetes.io/docs/reference/access-authn-authz/certificate-signing-requests/#kubernetes-signers).
478+
[`kubernetes.io/kubelet-serving`](/docs/reference/access-authn-authz/certificate-signing-requests/#kubernetes-signers).
471479
This will require action from the user or a third party controller.
472480

473481
These CSRs can be viewed using:

0 commit comments

Comments
 (0)