Skip to content

Commit a20b02e

Browse files
authored
Merge pull request #25599 from tengqm/zh-sync-kubeadm-certs
[zh] Sync kubeadm certs command reference
2 parents c3d0908 + 9c25470 commit a20b02e

18 files changed

+212
-232
lines changed

content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_alpha_certs.md renamed to content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_certs.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11

2-
<!-- ### Synopsis -->
2+
<!--
3+
### Synopsis
4+
-->
35
### 概要
46

5-
6-
7-
<!-- Commands related to handling kubernetes certificates -->
7+
<!--
8+
Commands related to handling kubernetes certificates
9+
-->
810
与处理 kubernetes 证书相关的命令
911

10-
<!-- ### Options -->
12+
<!--
13+
### Options
14+
-->
1115
### 选项
1216

1317
<table style="width: 100%; table-layout: fixed;">
@@ -21,16 +25,16 @@
2125
<td colspan="2">-h, --help</td>
2226
</tr>
2327
<tr>
24-
<!-- <td></td><td style="line-height: 130%; word-wrap: break-word;">help for certs</td> -->
28+
<!-- td></td><td style="line-height: 130%; word-wrap: break-word;">help for certs</td -->
2529
<td></td><td style="line-height: 130%; word-wrap: break-word;"><!-- help for certs-->certs 命令的帮助</td>
2630
</tr>
2731

2832
</tbody>
2933
</table>
3034

31-
32-
33-
<!-- ### Options inherited from parent commands -->
35+
<!--
36+
### Options inherited from parent commands
37+
-->
3438
### 继承于父命令的选项
3539

3640
<table style="width: 100%; table-layout: fixed;">
@@ -44,12 +48,11 @@
4448
<td colspan="2">--rootfs string</td>
4549
</tr>
4650
<tr>
47-
<!-- <td></td><td style="line-height: 130%; word-wrap: break-word;">[EXPERIMENTAL] The path to the 'real' host root filesystem.</td> -->
51+
<!-- td></td><td style="line-height: 130%; word-wrap: break-word;">[EXPERIMENTAL] The path to the 'real' host root filesystem.</td -->
4852
<td></td><td style="line-height: 130%; word-wrap: break-word;">[实验] 到'真实'主机根文件系统的路径。</td>
4953
</tr>
5054

5155
</tbody>
5256
</table>
5357

5458

55-
Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,27 @@
22
<!--
33
### Synopsis
44
-->
5-
65
### 概要
76

87
<!--
98
This command will print out a secure randomly-generated certificate key that can be used with
109
the "init" command.
1110
-->
12-
1311
该命令将打印出可以与 "init" 命令一起使用的安全的随机生成的证书密钥。
1412

1513
<!--
1614
You can also use "kubeadm init -upload-certs" without specifying a certificate key and it will generate and print one for you.
1715
-->
18-
19-
您也可以使用 `kubeadm init --upload-certs` 而无需指定证书密钥,它将为您生成并打印一个证书密钥
16+
你也可以使用 `kubeadm init --upload-certs` 而无需指定证书密钥;
17+
命令将为你生成并打印一个证书密钥
2018

2119
```
22-
kubeadm alpha certs certificate-key [flags]
20+
kubeadm certs certificate-key [flags]
2321
```
2422

2523
<!--
2624
### Options
2725
-->
28-
2926
### 选项
3027

3128
<table style="width: 100%; table-layout: fixed;">
@@ -53,7 +50,6 @@ certificate-key 操作的帮助命令
5350
<!--
5451
### Options inherited from parent commands
5552
-->
56-
5753
### 从父命令继承的选项
5854

5955
<table style="width: 100%; table-layout: fixed;">
Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,20 @@
11
<!--
22
### Synopsis
33
-->
4-
54
### 概要
65

76
<!--
87
Checks expiration for the certificates in the local PKI managed by kubeadm.
98
-->
10-
119
检查 kubeadm 管理的本地 PKI 中证书的到期时间。
1210

1311
```
14-
kubeadm alpha certs check-expiration [flags]
12+
kubeadm certs check-expiration [flags]
1513
```
1614

1715
<!--
1816
### Options
1917
-->
20-
2118
### 选项
2219

2320
<table style="width: 100%; table-layout: fixed;">
@@ -59,8 +56,9 @@ kubeadm alpha certs check-expiration [flags]
5956
</tbody>
6057
</table>
6158

62-
<!-- ### Options inherited from parent commands -->
63-
59+
<!--
60+
### Options inherited from parent commands
61+
-->
6462
### 继承于父命令的选项
6563

6664
<table style="width: 100%; table-layout: fixed;">
@@ -82,5 +80,3 @@ kubeadm alpha certs check-expiration [flags]
8280
</table>
8381

8482

85-
86-

content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_alpha_certs_generate-csr.md renamed to content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_certs_generate-csr.md

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,46 @@
66
Generates keys and certificate signing requests (CSRs) for all the certificates required to run the control plane. This command also generates partial kubeconfig files with private key data in the "users &gt; user &gt; client-key-data" field, and for each kubeconfig file an accompanying ".csr" file is created.
77
-->
88
为运行控制平面所需的所有证书生成密钥和证书签名请求(CSR)。该命令会生成部分 kubeconfig 文件,
9-
其中 "users &gt; user &gt; client-key-data" 字段包含私钥数据,并为每个 kubeconfig 文件创建一个随附的".csr"文件。
9+
其中 "users &gt; user &gt; client-key-data" 字段包含私钥数据,并为每个 kubeconfig
10+
文件创建一个随附的 ".csr" 文件。
1011

1112
<!--
1213
This command is designed for use in [Kubeadm External CA Mode](https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-certs/#external-ca-mode). It generates CSRs which you can then submit to your external certificate authority for signing.
1314
-->
14-
该命令设计用于 [Kubeadm 外部 CA 模式](https://kubernetes.io/zh/docs/tasks/administer-cluster/kubeadm/kubeadm-certs/#external-ca-mode)
15-
它生成 CSR,然后你可以将其提交给外部证书颁发机构进行签名。
15+
此命令设计用于
16+
[Kubeadm 外部 CA 模式](https://kubernetes.io/zh/docs/tasks/administer-cluster/kubeadm/kubeadm-certs/#external-ca-mode)
17+
它生成你可以提交给外部证书颁发机构进行签名的 CSR。
1618

1719
<!--
1820
The PEM encoded signed certificates should then be saved alongside the key files, using ".crt" as the file extension, or in the case of kubeconfig files, the PEM encoded signed certificate should be base64 encoded and added to the kubeconfig file in the "users &gt; user &gt; client-certificate-data" field.
1921
-->
20-
然后,应使用 ".crt" 作为文件扩展名将 PEM 编码的签名证书与密钥文件一起保存,或者,对于 kubeconfig 文件,
21-
PEM 编码的签名证书应使用 base64 编码,并添加到 "users &gt; user &gt; client-certificate-data" 字段。
22+
应使用 ".crt" 作为文件扩展名将 PEM 编码的签名证书与密钥文件一起保存。
23+
或者,对于 kubeconfig 文件,PEM 编码的签名证书应使用 base64 编码,
24+
并添加到 "users &gt; user &gt; client-certificate-data" 字段。
2225

2326
```
24-
kubeadm alpha certs generate-csr [flags]
27+
kubeadm certs generate-csr [flags]
2528
```
2629

27-
<!-- ### Examples -->
30+
<!--
31+
### Examples
32+
-->
2833
### 示例
2934

3035
<!--
3136
```
3237
# The following command will generate keys and CSRs for all control-plane certificates and kubeconfig files:
33-
kubeadm alpha certs generate-csr --kubeconfig-dir /tmp/etc-k8s --cert-dir /tmp/etc-k8s/pki
38+
kubeadm certs generate-csr --kubeconfig-dir /tmp/etc-k8s --cert-dir /tmp/etc-k8s/pki
3439
```
3540
-->
3641
```
37-
# 以下命令将为所有控制平面证书和 kubeconfig 文件生成密钥和 CSR :
38-
kubeadm alpha certs generate-csr --kubeconfig-dir /tmp/etc-k8s --cert-dir /tmp/etc-k8s/pki
42+
# 以下命令将为所有控制平面证书和 kubeconfig 文件生成密钥和 CSR :
43+
kubeadm certs generate-csr --kubeconfig-dir /tmp/etc-k8s --cert-dir /tmp/etc-k8s/pki
3944
```
4045

41-
<!-- ### Options -->
46+
<!--
47+
### Options
48+
-->
4249
### 选项
4350

4451
<table style="width: 100%; table-layout: fixed;">
@@ -52,41 +59,41 @@ kubeadm alpha certs generate-csr [flags]
5259
<td colspan="2">--cert-dir string</td>
5360
</tr>
5461
<tr>
55-
<!-- <td></td><td style="line-height: 130%; word-wrap: break-word;">The path where to save the certificates</td> -->
62+
<!-- td></td><td style="line-height: 130%; word-wrap: break-word;">The path where to save the certificates</td-->
5663
<td></td><td style="line-height: 130%; word-wrap: break-word;">保存证书的路径</td>
5764
</tr>
5865

5966
<tr>
6067
<td colspan="2">--config string</td>
6168
</tr>
6269
<tr>
63-
<!-- <td></td><td style="line-height: 130%; word-wrap: break-word;">Path to a kubeadm configuration file.</td> -->
70+
<!-- td></td><td style="line-height: 130%; word-wrap: break-word;">Path to a kubeadm configuration file.</td -->
6471
<td></td><td style="line-height: 130%; word-wrap: break-word;">kubeadm 配置文件的路径。</td>
6572
</tr>
6673

6774
<tr>
6875
<td colspan="2">-h, --help</td>
6976
</tr>
7077
<tr>
71-
<!-- <td></td><td style="line-height: 130%; word-wrap: break-word;">help for generate-csr</td> -->
78+
<!-- td></td><td style="line-height: 130%; word-wrap: break-word;">help for generate-csr</td -->
7279
<td></td><td style="line-height: 130%; word-wrap: break-word;">generate-csr 命令的帮助</td>
7380
</tr>
7481

7582
<tr>
76-
<!-- <td colspan="2">--kubeconfig-dir string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default: "/etc/kubernetes"</td> -->
83+
<!-- td colspan="2">-kubeconfig-dir string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default: "/etc/kubernetes"</td -->
7784
<td colspan="2">--kubeconfig-dir string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;默认值:"/etc/kubernetes"</td>
7885
</tr>
7986
<tr>
80-
<!-- <td></td><td style="line-height: 130%; word-wrap: break-word;">The path where to save the kubeconfig file.</td> -->
87+
<!-- td></td><td style="line-height: 130%; word-wrap: break-word;">The path where to save the kubeconfig file.</td-->
8188
<td></td><td style="line-height: 130%; word-wrap: break-word;">保存 kubeconfig 文件的路径。</td>
8289
</tr>
8390

8491
</tbody>
8592
</table>
8693

87-
88-
89-
<!-- ### Options inherited from parent commands -->
94+
<!--
95+
### Options inherited from parent commands
96+
-->
9097
### 继承于父命令的选项
9198

9299
<table style="width: 100%; table-layout: fixed;">
@@ -107,5 +114,3 @@ kubeadm alpha certs generate-csr [flags]
107114
</tbody>
108115
</table>
109116

110-
111-

content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_alpha_certs_renew.md renamed to content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_certs_renew.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,20 @@
22
<!--
33
### Synopsis
44
-->
5-
65
### 概要
76

87
<!--
98
This command is not meant to be run on its own. See list of available subcommands.
109
-->
11-
1210
此命令并非设计用来单独运行。请参阅可用子命令列表。
1311

1412
```
15-
kubeadm alpha certs renew [flags]
13+
kubeadm certs renew [flags]
1614
```
1715

1816
<!--
1917
### Options
2018
-->
21-
2219
### 选项
2320

2421
<table style="width: 100%; table-layout: fixed;">
Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,31 @@
22
<!--
33
### Synopsis
44
-->
5-
65
### 概要
76

87
<!--
98
Renew the certificate embedded in the kubeconfig file for the admin to use and for kubeadm itself.
109
-->
11-
1210
续订 kubeconfig 文件中嵌入的证书,供管理员 和 kubeadm 自身使用。
1311

1412
<!--
1513
Renewals run unconditionally, regardless of certificate expiration date; extra attributes such as SANs will be based on the existing file/certificates, there is no need to resupply them.
1614
-->
17-
1815
无论证书的到期日期如何,续订都是无条件进行的;SAN 等额外属性将基于现有文件/证书,因此无需重新提供它们。
1916

2017
<!--
2118
Renewal by default tries to use the certificate authority in the local PKI managed by kubeadm; as alternative it is possible to use K8s certificate API for certificate renewal, or as a last option, to generate a CSR request.
2219
-->
23-
2420
默认情况下,续订会尝试使用由 kubeadm 管理的本地 PKI 中的证书机构;作为替代方案,
25-
也可以使用 K8s certificate API 进行证书续订,或者(作为最后一种选择)生成 CSR 请求。
21+
也可以使用 K8s 证书 API 进行证书续订,或者(作为最后一种选择)生成 CSR 请求。
2622

2723
<!--
2824
After renewal, in order to make changes effective, is is required to restart control-plane components and eventually re-distribute the renewed certificate in case the file is used elsewhere.
2925
-->
30-
3126
续订后,为了使更改生效,需要重新启动控制平面组件,并最终重新分发更新的证书,以防证书文件在其他地方使用。
3227

3328
```
34-
kubeadm alpha certs renew admin.conf [flags]
29+
kubeadm certs renew admin.conf [flags]
3530
```
3631

3732
<!--
@@ -100,7 +95,7 @@ Create CSRs instead of generating certificates
10095
<tr>
10196
<td></td><td style="line-height: 130%; word-wrap: break-word;">
10297
<!-- help for admin.conf -->
103-
admin.conf 操作的帮助命令
98+
admin.conf 子操作的帮助命令
10499
</td>
105100
</tr>
106101

@@ -110,7 +105,8 @@ admin.conf 操作的帮助命令
110105
<tr>
111106
<td></td><td style="line-height: 130%; word-wrap: break-word;">
112107
<!-- The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file. -->
113-
与集群通信时使用的 kubeconfig 文件。如果未设置该参数,则可以在一组标准位置中搜索现有的 kubeconfig 文件。
108+
与集群通信时使用的 kubeconfig 文件。
109+
如果未设置该参数,则可以在一组标准位置中搜索现有的 kubeconfig 文件。
114110
</td>
115111
</tr>
116112

@@ -132,7 +128,6 @@ Use the Kubernetes certificate API to renew certificates
132128
<!--
133129
### Options inherited from parent commands
134130
-->
135-
136131
### 从父命令继承的选项
137132

138133
<table style="width: 100%; table-layout: fixed;">

content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_alpha_certs_renew_all.md renamed to content/zh/docs/reference/setup-tools/kubeadm/generated/kubeadm_certs_renew_all.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,20 @@
22
<!--
33
### Synopsis
44
-->
5-
65
### 概要
76

87
<!--
98
Renew all known certificates necessary to run the control plane. Renewals are run unconditionally, regardless of expiration date. Renewals can also be run individually for more control.
109
-->
11-
1210
续订运行控制平面所需的所有已知证书。续订是无条件进行的,与到期日期无关。续订也可以单独运行以进行更多控制。
1311

1412
```
15-
kubeadm alpha certs renew all [flags]
13+
kubeadm certs renew all [flags]
1614
```
1715

1816
<!--
1917
### Options
2018
-->
21-
2219
### 选项
2320

2421
<table style="width: 100%; table-layout: fixed;">
@@ -106,7 +103,8 @@ all 操作的帮助命令
106103
<!--
107104
The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file.
108105
-->
109-
与集群通信时使用的 kubeconfig 文件。如果未设置该参数,则可以在一组标准位置中搜索现有的 kubeconfig 文件。
106+
与集群通信时使用的 kubeconfig 文件。
107+
如果未设置该参数,则可以在一组标准位置中搜索现有的 kubeconfig 文件。
110108
</td>
111109
</tr>
112110

@@ -128,7 +126,6 @@ Use the Kubernetes certificate API to renew certificates
128126
<!--
129127
### Options inherited from parent commands
130128
-->
131-
132129
### 从父命令继承的选项
133130

134131
<table style="width: 100%; table-layout: fixed;">

0 commit comments

Comments
 (0)