Skip to content

Commit 72772a4

Browse files
committed
[zh-cn] sync content-guide content-organization kubeadm-certs
Signed-off-by: xin.li <[email protected]>
1 parent 90c0749 commit 72772a4

File tree

3 files changed

+67
-38
lines changed

3 files changed

+67
-38
lines changed

content/zh-cn/docs/contribute/style/content-guide.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,21 @@ Kubernetes 网站(包括其文档)源代码位于
7171
<!--
7272
### Third party content
7373
74-
Kubernetes documentation includes applied examples of projects in the Kubernetes project&mdash;projects that live in the [kubernetes](https://github.com/kubernetes) and
74+
Kubernetes documentation includes applied examples of projects in the Kubernetes
75+
project&mdash;projects that live in the [kubernetes](https://github.com/kubernetes) and
7576
[kubernetes-sigs](https://github.com/kubernetes-sigs) GitHub organizations.
7677
7778
Links to active content in the Kubernetes project are always allowed.
7879
7980
Kubernetes requires some third party content to function. Examples include container runtimes (containerd, CRI-O, Docker),
80-
[networking policy](/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/) (CNI plugins), [Ingress controllers](/docs/concepts/services-networking/ingress-controllers/), and [logging](/docs/concepts/cluster-administration/logging/).
81+
[networking policy](/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/) (CNI plugins),
82+
[Ingress controllers](/docs/concepts/services-networking/ingress-controllers/),
83+
and [logging](/docs/concepts/cluster-administration/logging/).
8184
82-
Docs can link to third-party open source software (OSS) outside the Kubernetes project only if it's necessary for Kubernetes to function.
85+
Docs can link to third-party open source software (OSS) outside the Kubernetes
86+
project only if it's necessary for Kubernetes to function.
8387
-->
84-
### 第三方内容 {#third-party-content}
88+
### 第三方内容 {#third-party-content}
8589

8690
Kubernetes 文档包含 Kubernetes 项目下的多个项目的应用示例。
8791
这里的 Kubernetes 项目指的是 [Kubernetes](https://github.com/kubernetes)

content/zh-cn/docs/contribute/style/content-organization.md

Lines changed: 43 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ concept.
3232
3333
### Page Order
3434
35-
The documentation side menu, the documentation page browser etc. are listed using Hugo's default sort order, which sorts by weight (from 1), date (newest first), and finally by the link title.
35+
The documentation side menu, the documentation page browser etc. are listed using
36+
Hugo's default sort order, which sorts by weight (from 1), date (newest first),
37+
and finally by the link title.
3638
3739
Given that, if you want to move a page or a section up, set a weight in the page's front matter:
3840
-->
@@ -51,8 +53,11 @@ weight: 10
5153
```
5254
5355
<!--
54-
For page weights, it can be smart not to use 1, 2, 3 ..., but some other interval, say 10, 20, 30... This allows you to insert pages where you want later.
55-
Additionally, each weight within the same directory (section) should not be overlapped with the other weights. This makes sure that content is always organized correctly, especially in localized content.
56+
For page weights, it can be smart not to use 1, 2, 3 ..., but some other interval,
57+
say 10, 20, 30... This allows you to insert pages where you want later.
58+
Additionally, each weight within the same directory (section) should not be
59+
overlapped with the other weights. This makes sure that content is always
60+
organized correctly, especially in localized content.
5661
-->
5762
{{< note >}}
5863
对于页面的权重,不建议使用连续的数值,比如 1、2、3...,而应采用其他间隔的数值,比如 10、20、30...
@@ -64,7 +69,8 @@ Additionally, each weight within the same directory (section) should not be over
6469
<!--
6570
### Documentation Main Menu
6671
67-
The `Documentation` main menu is built from the sections below `docs/` with the `main_menu` flag set in front matter of the `_index.md` section content file:
72+
The `Documentation` main menu is built from the sections below `docs/` with
73+
the `main_menu` flag set in front matter of the `_index.md` section content file:
6874
-->
6975
### 文档主菜单
7076

@@ -76,7 +82,8 @@ main_menu: true
7682
```
7783

7884
<!--
79-
Note that the link title is fetched from the page's `linkTitle`, so if you want it to be something different than the title, change it in the content file:
85+
Note that the link title is fetched from the page's `linkTitle`, so if you want
86+
it to be something different than the title, change it in the content file:
8087
-->
8188
注意,链接标题来自页面的 `linkTitle` 字段,因此如果希望它与页面标题不同,请在内容文件中更改它:
8289

@@ -87,7 +94,9 @@ linkTitle: Title used in links
8794
```
8895

8996
<!--
90-
The above needs to be done per language. If you don't see your section in the menu, it is probably because it is not identified as a section by Hugo. Create a `_index.md` content file in the section folder.
97+
The above needs to be done per language. If you don't see your section in the menu,
98+
it is probably because it is not identified as a section by Hugo. Create a
99+
`_index.md` content file in the section folder.
91100
-->
92101
{{< note >}}
93102
你需要分别针对每种语言完成上述操作。如果在菜单中没有看到你的章节,这可能是因为它没有被 Hugo 识别为一个章节。
@@ -103,11 +112,12 @@ It will show all sections and their pages.
103112

104113
If you don't want to list a section or page, set the `toc_hide` flag to `true` in front matter:
105114

106-
When you navigate to a section that has content, the specific section or page (e.g. `_index.md`) is shown. Else, the first page inside that section is shown.
115+
When you navigate to a section that has content, the specific section or page
116+
(e.g. `_index.md`) is shown. Else, the first page inside that section is shown.
107117
-->
108118
### 文档侧方菜单
109119

110-
文档侧方菜单是基于 `docs/` 下面的 **当前章节的内容树** 构建的。
120+
文档侧方菜单是基于 `docs/` 下面的**当前章节的内容树**构建的。
111121

112122
菜单默认显示所有的章节和它们的页面。
113123

@@ -123,11 +133,12 @@ toc_hide: true
123133
<!--
124134
### Documentation Browser
125135

126-
The page browser on the documentation home page is built using all the sections and pages that are directly below the `docs section`.
136+
The page browser on the documentation home page is built using all the sections
137+
and pages that are directly below the `docs section`.
127138

128139
If you don't want to list a section or page, set the `toc_hide` flag to `true` in front matter:
129140
-->
130-
### 文档浏览器 {#documentation-browser}
141+
### 文档浏览器 {#documentation-browser}
131142

132143
文档主页上的页面浏览器是基于 `docs section` 下一层的所有章节和页面构建的。
133144

@@ -140,7 +151,9 @@ toc_hide: true
140151
<!--
141152
### The Main Menu
142153

143-
The site links in the top-right menu -- and also in the footer -- are built by page-lookups. This is to make sure that the page actually exists. So, if the `case-studies` section does not exist in a site (language), it will not be linked to.
154+
The site links in the top-right menu -- and also in the footer -- are built by
155+
page-lookups. This is to make sure that the page actually exists. So, if the
156+
`case-studies` section does not exist in a site (language), it will not be linked to.
144157
-->
145158
### 主菜单
146159

@@ -151,9 +164,12 @@ The site links in the top-right menu -- and also in the footer -- are built by p
151164
<!--
152165
## Page Bundles
153166

154-
In addition to standalone content pages (Markdown files), Hugo supports [Page Bundles](https://gohugo.io/content-management/page-bundles/).
167+
In addition to standalone content pages (Markdown files), Hugo supports
168+
[Page Bundles](https://gohugo.io/content-management/page-bundles/).
155169

156-
One example is [Custom Hugo Shortcodes](/docs/contribute/style/hugo-shortcodes/). It is considered a `leaf bundle`. Everything below the directory, including the `index.md`, will be part of the bundle. This also includes page-relative links, images that can be processed etc.:
170+
One example is [Custom Hugo Shortcodes](/docs/contribute/style/hugo-shortcodes/).
171+
It is considered a `leaf bundle`. Everything below the directory, including the `index.md`,
172+
will be part of the bundle. This also includes page-relative links, images that can be processed etc.:
157173
-->
158174
## 页面包
159175

@@ -173,7 +189,8 @@ zh-cn/docs/home/contribute/includes
173189
```
174190

175191
<!--
176-
Another widely used example is the `includes` bundle. It sets `headless: true` in front matter, which means that it does not get its own URL. It is only used in other pages.
192+
Another widely used example is the `includes` bundle. It sets `headless: true` in
193+
front matter, which means that it does not get its own URL. It is only used in other pages.
177194
-->
178195
另一个广泛使用的例子是 `includes` 包。
179196
这类包在页面头部设置 `headless: true`,意味着它没有得到自己的 URL。它只用于其他页面。
@@ -192,9 +209,13 @@ zh-cn/includes
192209
<!--
193210
Some important notes to the files in the bundles:
194211

195-
* For translated bundles, any missing non-content files will be inherited from languages above. This avoids duplication.
196-
* All the files in a bundle are what Hugo calls `Resources` and you can provide metadata per language, such as parameters and title, even if it does not supports front matter (YAML files etc.). See [Page Resources Metadata](https://gohugo.io/content-management/page-resources/#page-resources-metadata).
197-
* The value you get from `.RelPermalink` of a `Resource` is page-relative. See [Permalinks](https://gohugo.io/content-management/urls/#permalinks).
212+
* For translated bundles, any missing non-content files will be inherited from
213+
languages above. This avoids duplication.
214+
* All the files in a bundle are what Hugo calls `Resources` and you can provide
215+
metadata per language, such as parameters and title, even if it does not supports front
216+
matter (YAML files etc.). See [Page Resources Metadata](https://gohugo.io/content-management/page-resources/#page-resources-metadata).
217+
* The value you get from `.RelPermalink` of a `Resource` is page-relative.
218+
See [Permalinks](https://gohugo.io/content-management/urls/#permalinks).
198219
-->
199220
有关包中文件的一些重要说明:
200221

@@ -208,11 +229,13 @@ Some important notes to the files in the bundles:
208229
<!--
209230
## Styles
210231

211-
The [SASS](https://sass-lang.com/) source of the stylesheets for this site is stored in `assets/sass` and is automatically built by Hugo.
232+
The [SASS](https://sass-lang.com/) source of the stylesheets for this site is
233+
stored in `assets/sass` and is automatically built by Hugo.
212234
-->
213-
## 样式 {#styles}
235+
## 样式 {#styles}
214236

215-
本网站的样式表的 [SASS](https://sass-lang.com/) 源文件存放在 `src/sass` 下面,并通过 Hugo 自动构建。
237+
本网站的样式表的 [SASS](https://sass-lang.com/) 源文件存放在 `src/sass` 下面,
238+
并通过 Hugo 自动构建。
216239

217240
## {{% heading "whatsnext" %}}
218241

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

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ By default, kubeadm generates all the certificates needed for a cluster to run.
3939
You can override this behavior by providing your own certificates.
4040
-->
4141

42-
## 使用自定义的证书 {#custom-certificates}
42+
## 使用自定义的证书 {#custom-certificates}
4343

4444
默认情况下,kubeadm 会生成运行一个集群所需的全部证书。
4545
你可以通过提供你自己的证书来改变这个行为策略。
@@ -72,7 +72,7 @@ this condition and activates the "External CA" mode. kubeadm will proceed withou
7272
CA key on disk.
7373
-->
7474

75-
## 外部 CA 模式 {#external-ca-mode}
75+
## 外部 CA 模式 {#external-ca-mode}
7676

7777
只提供了 `ca.crt` 文件但是不提供 `ca.key` 文件也是可以的
7878
(这只对 CA 根证书可用,其它证书不可用)。
@@ -90,14 +90,15 @@ point to the CA certificate and key.
9090
[PKI certificates and requirements](/docs/setup/best-practices/certificates/) includes guidance on
9191
setting up a cluster to use an external CA.
9292
-->
93-
[PKI 证书和要求](/zh-cn/docs/setup/best-practices/certificates/)包括集群使用外部 CA 的设置指南。
93+
[PKI 证书和要求](/zh-cn/docs/setup/best-practices/certificates/)包括集群使用外部
94+
CA 的设置指南。
9495

9596
<!--
9697
## Check certificate expiration
9798
9899
You can use the `check-expiration` subcommand to check when certificates expire:
99100
-->
100-
## 检查证书是否过期 {#check-certificate-expiration}
101+
## 检查证书是否过期 {#check-certificate-expiration}
101102

102103
你可以使用 `check-expiration` 子命令来检查证书何时过期
103104

@@ -110,7 +111,7 @@ The output is similar to this:
110111
-->
111112
输出类似于以下内容:
112113

113-
```
114+
```console
114115
CERTIFICATE EXPIRES RESIDUAL TIME CERTIFICATE AUTHORITY EXTERNALLY MANAGED
115116
admin.conf Dec 30, 2020 23:36 UTC 364d no
116117
apiserver Dec 30, 2020 23:36 UTC 364d ca no
@@ -258,13 +259,14 @@ the Pod and the certificate renewal for the component can complete.
258259
-->
259260
此命令用 CA(或者 front-proxy-CA )证书和存储在 `/etc/kubernetes/pki` 中的密钥执行更新。
260261

261-
执行完此命令之后你需要重启控制面 Pods。因为动态证书重载目前还不被所有组件和证书支持,所有这项操作是必须的。
262-
[静态 Pods](/zh-cn/docs/tasks/configure-pod-container/static-pod/) 是被本地 kubelet 而不是 API Server 管理,
263-
所以 kubectl 不能用来删除或重启他们。
262+
执行完此命令之后你需要重启控制面 Pod。因为动态证书重载目前还不被所有组件和证书支持,所有这项操作是必须的。
263+
[静态 Pod](/zh-cn/docs/tasks/configure-pod-container/static-pod/) 是被本地 kubelet
264+
而不是 API 服务器管理,所以 kubectl 不能用来删除或重启他们。
264265
要重启静态 Pod 你可以临时将清单文件从 `/etc/kubernetes/manifests/` 移除并等待 20 秒
265-
(参考 [KubeletConfiguration 结构](/zh-cn/docs/reference/config-api/kubelet-config.v1beta1/) 中的`fileCheckFrequency` 值)。
266-
如果 Pod 不在清单目录里,kubelet 将会终止它。
267-
在另一个 `fileCheckFrequency` 周期之后你可以将文件移回去,为了组件可以完成 kubelet 将重新创建 Pod 和证书更新。
266+
(参考 [KubeletConfiguration 结构](/zh-cn/docs/reference/config-api/kubelet-config.v1beta1/)中的
267+
`fileCheckFrequency` 值)。如果 Pod 不在清单目录里,kubelet 将会终止它。
268+
在另一个 `fileCheckFrequency` 周期之后你可以将文件移回去,kubelet 可以完成 Pod
269+
的重建,而组件的证书更新操作也得以完成。
268270

269271
{{< warning >}}
270272
<!--
@@ -494,7 +496,7 @@ serverTLSBootstrap: true
494496
If you have already created the cluster you must adapt it by doing the following:
495497
- Find and edit the `kubelet-config-{{< skew currentVersion >}}` ConfigMap in the `kube-system` namespace.
496498
In that ConfigMap, the `kubelet` key has a
497-
[KubeletConfiguration](/docs/reference/config-api/kubelet-config.v1beta1/#kubelet-config-k8s-io-v1beta1-KubeletConfiguration)
499+
[KubeletConfiguration](/docs/reference/config-api/kubelet-config.v1beta1/)
498500
document as its value. Edit the KubeletConfiguration document to set `serverTLSBootstrap: true`.
499501
- On each node, add the `serverTLSBootstrap: true` field in `/var/lib/kubelet/config.yaml`
500502
and restart the kubelet with `systemctl restart kubelet`
@@ -504,7 +506,7 @@ and restart the kubelet with `systemctl restart kubelet`
504506
- 找到 `kube-system` 名字空间中名为 `kubelet-config-{{< skew currentVersion >}}`
505507
的 ConfigMap 并编辑之。
506508
在该 ConfigMap 中,`kubelet` 键下面有一个
507-
[KubeletConfiguration](/zh-cn/docs/reference/config-api/kubelet-config.v1beta1/#kubelet-config-k8s-io-v1beta1-KubeletConfiguration)
509+
[KubeletConfiguration](/zh-cn/docs/reference/config-api/kubelet-config.v1beta1/)
508510
文档作为其取值。编辑该 KubeletConfiguration 文档以设置
509511
`serverTLSBootstrap: true`。
510512
- 在每个节点上,在 `/var/lib/kubelet/config.yaml` 文件中添加
@@ -533,7 +535,7 @@ CSR(证书签名请求)不能被 kube-controller-manager 中默认的签名
533535
kubectl get csr
534536
```
535537

536-
```none
538+
```console
537539
NAME AGE SIGNERNAME REQUESTOR CONDITION
538540
csr-9wvgt 112s kubernetes.io/kubelet-serving system:node:worker-1 Pending
539541
csr-lz97v 1m58s kubernetes.io/kubelet-serving system:node:control-plane-1 Pending

0 commit comments

Comments
 (0)