Skip to content

Commit 51d1914

Browse files
authored
Merge pull request #36308 from tengqm/resync-kubeadm-certs-gen
[zh] Convert kubeadm-certs-gen page to UNIX format
2 parents 8f28267 + 023f285 commit 51d1914

File tree

1 file changed

+121
-130
lines changed

1 file changed

+121
-130
lines changed
Lines changed: 121 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -1,130 +1,121 @@
1-
<!--
2-
The file is auto-generated from the Go source code of the component using a generic
3-
[generator](https://github.com/kubernetes-sigs/reference-docs/). To learn how
4-
to generate the reference documentation, please read
5-
[Contributing to the reference documentation](/docs/contribute/generate-ref-docs/).
6-
To update the reference conent, please follow the
7-
[Contributing upstream](/docs/contribute/generate-ref-docs/contribute-upstream/)
8-
guide. You can file document formatting bugs against the
9-
[reference-docs](https://github.com/kubernetes-sigs/reference-docs/) project.
10-
-->
11-
12-
<!--
13-
Generate keys and certificate signing requests
14-
-->
15-
生成密钥和证书签名请求
16-
17-
<!-- ### Synopsis -->
18-
### 概要
19-
20-
<!--
21-
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.
22-
-->
23-
为运行控制平面所需的所有证书生成密钥和证书签名请求(CSR)。该命令会生成部分 kubeconfig 文件,
24-
其中 "users &gt; user &gt; client-key-data" 字段包含私钥数据,并为每个 kubeconfig
25-
文件创建一个随附的 ".csr" 文件。
26-
27-
<!--
28-
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.
29-
-->
30-
此命令设计用于
31-
[Kubeadm 外部 CA 模式](https://kubernetes.io/zh-cn/docs/tasks/administer-cluster/kubeadm/kubeadm-certs/#external-ca-mode)
32-
它生成你可以提交给外部证书颁发机构进行签名的 CSR。
33-
34-
<!--
35-
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.
36-
-->
37-
应使用 ".crt" 作为文件扩展名将 PEM 编码的签名证书与密钥文件一起保存。
38-
或者,对于 kubeconfig 文件,PEM 编码的签名证书应使用 base64 编码,
39-
并添加到 "users &gt; user &gt; client-certificate-data" 字段。
40-
41-
```
42-
kubeadm certs generate-csr [flags]
43-
```
44-
45-
<!--
46-
### Examples
47-
-->
48-
### 示例
49-
50-
<!--
51-
```
52-
# The following command will generate keys and CSRs for all control-plane certificates and kubeconfig files:
53-
kubeadm certs generate-csr --kubeconfig-dir /tmp/etc-k8s --cert-dir /tmp/etc-k8s/pki
54-
```
55-
-->
56-
```
57-
# 以下命令将为所有控制平面证书和 kubeconfig 文件生成密钥和 CSR :
58-
kubeadm certs generate-csr --kubeconfig-dir /tmp/etc-k8s --cert-dir /tmp/etc-k8s/pki
59-
```
60-
61-
<!--
62-
### Options
63-
-->
64-
### 选项
65-
66-
<table style="width: 100%; table-layout: fixed;">
67-
<colgroup>
68-
<col span="1" style="width: 10px;" />
69-
<col span="1" />
70-
</colgroup>
71-
<tbody>
72-
73-
<tr>
74-
<td colspan="2">--cert-dir string</td>
75-
</tr>
76-
<tr>
77-
<!-- td></td><td style="line-height: 130%; word-wrap: break-word;">The path where to save the certificates</td-->
78-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>保存证书的路径</p></td>
79-
</tr>
80-
81-
<tr>
82-
<td colspan="2">--config string</td>
83-
</tr>
84-
<tr>
85-
<!-- td></td><td style="line-height: 130%; word-wrap: break-word;">Path to a kubeadm configuration file.</td -->
86-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>kubeadm 配置文件的路径。</p></td>
87-
</tr>
88-
89-
<tr>
90-
<td colspan="2">-h, --help</td>
91-
</tr>
92-
<tr>
93-
<!-- td></td><td style="line-height: 130%; word-wrap: break-word;">help for generate-csr</td -->
94-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>generate-csr 命令的帮助</p></td>
95-
</tr>
96-
97-
<tr>
98-
<!-- td colspan="2">-kubeconfig-dir string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default: "/etc/kubernetes"</td -->
99-
<td colspan="2">--kubeconfig-dir string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;默认值:"/etc/kubernetes"</td>
100-
</tr>
101-
<tr>
102-
<!-- td></td><td style="line-height: 130%; word-wrap: break-word;">The path where to save the kubeconfig file.</td-->
103-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>保存 kubeconfig 文件的路径。</p></td>
104-
</tr>
105-
106-
</tbody>
107-
</table>
108-
109-
<!--
110-
### Options inherited from parent commands
111-
-->
112-
### 继承于父命令的选项
113-
114-
<table style="width: 100%; table-layout: fixed;">
115-
<colgroup>
116-
<col span="1" style="width: 10px;" />
117-
<col span="1" />
118-
</colgroup>
119-
<tbody>
120-
121-
<tr>
122-
<td colspan="2">--rootfs string</td>
123-
</tr>
124-
<tr>
125-
<!-- <td></td><td style="line-height: 130%; word-wrap: break-word;">[EXPERIMENTAL] The path to the 'real' host root filesystem.</td> -->
126-
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>[实验] 到'真实'主机根文件系统的路径。</p></td>
127-
</tr>
128-
129-
</tbody>
130-
</table>
1+
<!--
2+
Generate keys and certificate signing requests
3+
-->
4+
生成密钥和证书签名请求
5+
6+
<!--
7+
### Synopsis
8+
-->
9+
### 概要
10+
11+
<!--
12+
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.
13+
-->
14+
为运行控制平面所需的所有证书生成密钥和证书签名请求(CSR)。该命令会生成部分 kubeconfig 文件,
15+
其中 "users &gt; user &gt; client-key-data" 字段包含私钥数据,并为每个 kubeconfig
16+
文件创建一个随附的 ".csr" 文件。
17+
18+
<!--
19+
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.
20+
-->
21+
此命令设计用于 [Kubeadm 外部 CA 模式](https://kubernetes.io/zh-cn/docs/tasks/administer-cluster/kubeadm/kubeadm-certs/#external-ca-mode)
22+
它生成你可以提交给外部证书颁发机构进行签名的 CSR。
23+
24+
<!--
25+
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.
26+
-->
27+
你需要使用 ".crt" 作为文件扩展名将 PEM 编码的签名证书与密钥文件一起保存。
28+
或者,对于 kubeconfig 文件,PEM 编码的签名证书应使用 base64 编码,
29+
并添加到 "users &gt; user &gt; client-certificate-data" 字段。
30+
31+
```
32+
kubeadm certs generate-csr [flags]
33+
```
34+
35+
<!--
36+
### Examples
37+
-->
38+
### 示例
39+
40+
<!--
41+
```
42+
# The following command will generate keys and CSRs for all control-plane certificates and kubeconfig files:
43+
kubeadm certs generate-csr --kubeconfig-dir /tmp/etc-k8s --cert-dir /tmp/etc-k8s/pki
44+
```
45+
-->
46+
```
47+
# 以下命令将为所有控制平面证书和 kubeconfig 文件生成密钥和 CSR :
48+
kubeadm certs generate-csr --kubeconfig-dir /tmp/etc-k8s --cert-dir /tmp/etc-k8s/pki
49+
```
50+
51+
<!--
52+
### Options
53+
-->
54+
### 选项
55+
56+
<table style="width: 100%; table-layout: fixed;">
57+
<colgroup>
58+
<col span="1" style="width: 10px;" />
59+
<col span="1" />
60+
</colgroup>
61+
<tbody>
62+
63+
<tr>
64+
<td colspan="2">--cert-dir string</td>
65+
</tr>
66+
<tr>
67+
<!-- td></td><td style="line-height: 130%; word-wrap: break-word;">The path where to save the certificates</td-->
68+
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>保存证书的路径</p></td>
69+
</tr>
70+
71+
<tr>
72+
<td colspan="2">--config string</td>
73+
</tr>
74+
<tr>
75+
<!-- td></td><td style="line-height: 130%; word-wrap: break-word;">Path to a kubeadm configuration file.</td -->
76+
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>kubeadm 配置文件的路径。</p></td>
77+
</tr>
78+
79+
<tr>
80+
<td colspan="2">-h, --help</td>
81+
</tr>
82+
<tr>
83+
<!-- td></td><td style="line-height: 130%; word-wrap: break-word;">help for generate-csr</td -->
84+
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>generate-csr 命令的帮助</p></td>
85+
</tr>
86+
87+
<tr>
88+
<!-- td colspan="2">-kubeconfig-dir string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default: "/etc/kubernetes"</td -->
89+
<td colspan="2">--kubeconfig-dir string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;默认值:"/etc/kubernetes"</td>
90+
</tr>
91+
<tr>
92+
<!-- td></td><td style="line-height: 130%; word-wrap: break-word;">The path where to save the kubeconfig file.</td-->
93+
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>保存 kubeconfig 文件的路径。</p></td>
94+
</tr>
95+
96+
</tbody>
97+
</table>
98+
99+
<!--
100+
### Options inherited from parent commands
101+
-->
102+
### 继承于父命令的选项
103+
104+
<table style="width: 100%; table-layout: fixed;">
105+
<colgroup>
106+
<col span="1" style="width: 10px;" />
107+
<col span="1" />
108+
</colgroup>
109+
<tbody>
110+
111+
<tr>
112+
<td colspan="2">--rootfs string</td>
113+
</tr>
114+
<tr>
115+
<!-- <td></td><td style="line-height: 130%; word-wrap: break-word;">[EXPERIMENTAL] The path to the 'real' host root filesystem.</td> -->
116+
<td></td><td style="line-height: 130%; word-wrap: break-word;"><p>[实验] 到'真实'主机根文件系统的路径。</p></td>
117+
</tr>
118+
119+
</tbody>
120+
</table>
121+

0 commit comments

Comments
 (0)