diff --git a/content/zh-cn/docs/contribute/style/content-guide.md b/content/zh-cn/docs/contribute/style/content-guide.md index c908791788..ad46a8f092 100644 --- a/content/zh-cn/docs/contribute/style/content-guide.md +++ b/content/zh-cn/docs/contribute/style/content-guide.md @@ -71,17 +71,21 @@ Kubernetes 网站(包括其文档)源代码位于 -### 第三方内容 {#third-party-content} +### 第三方内容 {#third-party-content} Kubernetes 文档包含 Kubernetes 项目下的多个项目的应用示例。 这里的 Kubernetes 项目指的是 [Kubernetes](https://github.com/kubernetes) 和 diff --git a/content/zh-cn/docs/contribute/style/content-organization.md b/content/zh-cn/docs/contribute/style/content-organization.md index dddf905d56..d22f065f15 100644 --- a/content/zh-cn/docs/contribute/style/content-organization.md +++ b/content/zh-cn/docs/contribute/style/content-organization.md @@ -32,7 +32,9 @@ concept. ### Page Order -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. +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. Given that, if you want to move a page or a section up, set a weight in the page's front matter: --> @@ -51,8 +53,11 @@ weight: 10 ``` {{< note >}} 对于页面的权重,不建议使用连续的数值,比如 1、2、3...,而应采用其他间隔的数值,比如 10、20、30... @@ -64,7 +69,8 @@ Additionally, each weight within the same directory (section) should not be over ### 文档主菜单 @@ -76,7 +82,8 @@ main_menu: true ``` 注意,链接标题来自页面的 `linkTitle` 字段,因此如果希望它与页面标题不同,请在内容文件中更改它: @@ -87,7 +94,9 @@ linkTitle: Title used in links ``` {{< note >}} 你需要分别针对每种语言完成上述操作。如果在菜单中没有看到你的章节,这可能是因为它没有被 Hugo 识别为一个章节。 @@ -103,11 +112,12 @@ It will show all sections and their pages. If you don't want to list a section or page, set the `toc_hide` flag to `true` in front matter: -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. +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. --> ### 文档侧方菜单 -文档侧方菜单是基于 `docs/` 下面的 **当前章节的内容树** 构建的。 +文档侧方菜单是基于 `docs/` 下面的**当前章节的内容树**构建的。 菜单默认显示所有的章节和它们的页面。 @@ -123,11 +133,12 @@ toc_hide: true -### 文档浏览器 {#documentation-browser} +### 文档浏览器 {#documentation-browser} 文档主页上的页面浏览器是基于 `docs section` 下一层的所有章节和页面构建的。 @@ -140,7 +151,9 @@ toc_hide: true ### 主菜单 @@ -151,9 +164,12 @@ The site links in the top-right menu -- and also in the footer -- are built by p ## 页面包 @@ -173,7 +189,8 @@ zh-cn/docs/home/contribute/includes ``` 另一个广泛使用的例子是 `includes` 包。 这类包在页面头部设置 `headless: true`,意味着它没有得到自己的 URL。它只用于其他页面。 @@ -192,9 +209,13 @@ zh-cn/includes 有关包中文件的一些重要说明: @@ -208,11 +229,13 @@ Some important notes to the files in the bundles: -## 样式 {#styles} +## 样式 {#styles} -本网站的样式表的 [SASS](https://sass-lang.com/) 源文件存放在 `src/sass` 下面,并通过 Hugo 自动构建。 +本网站的样式表的 [SASS](https://sass-lang.com/) 源文件存放在 `src/sass` 下面, +并通过 Hugo 自动构建。 ## {{% heading "whatsnext" %}} diff --git a/content/zh-cn/docs/tasks/administer-cluster/kubeadm/kubeadm-certs.md b/content/zh-cn/docs/tasks/administer-cluster/kubeadm/kubeadm-certs.md index a2569f5397..e2759693d2 100644 --- a/content/zh-cn/docs/tasks/administer-cluster/kubeadm/kubeadm-certs.md +++ b/content/zh-cn/docs/tasks/administer-cluster/kubeadm/kubeadm-certs.md @@ -39,7 +39,7 @@ By default, kubeadm generates all the certificates needed for a cluster to run. You can override this behavior by providing your own certificates. --> -## 使用自定义的证书 {#custom-certificates} +## 使用自定义的证书 {#custom-certificates} 默认情况下,kubeadm 会生成运行一个集群所需的全部证书。 你可以通过提供你自己的证书来改变这个行为策略。 @@ -72,7 +72,7 @@ this condition and activates the "External CA" mode. kubeadm will proceed withou CA key on disk. --> -## 外部 CA 模式 {#external-ca-mode} +## 外部 CA 模式 {#external-ca-mode} 只提供了 `ca.crt` 文件但是不提供 `ca.key` 文件也是可以的 (这只对 CA 根证书可用,其它证书不可用)。 @@ -90,14 +90,15 @@ point to the CA certificate and key. [PKI certificates and requirements](/docs/setup/best-practices/certificates/) includes guidance on setting up a cluster to use an external CA. --> -[PKI 证书和要求](/zh-cn/docs/setup/best-practices/certificates/)包括集群使用外部 CA 的设置指南。 +[PKI 证书和要求](/zh-cn/docs/setup/best-practices/certificates/)包括集群使用外部 +CA 的设置指南。 -## 检查证书是否过期 {#check-certificate-expiration} +## 检查证书是否过期 {#check-certificate-expiration} 你可以使用 `check-expiration` 子命令来检查证书何时过期 @@ -110,7 +111,7 @@ The output is similar to this: --> 输出类似于以下内容: -``` +```console CERTIFICATE EXPIRES RESIDUAL TIME CERTIFICATE AUTHORITY EXTERNALLY MANAGED admin.conf Dec 30, 2020 23:36 UTC 364d no 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. --> 此命令用 CA(或者 front-proxy-CA )证书和存储在 `/etc/kubernetes/pki` 中的密钥执行更新。 -执行完此命令之后你需要重启控制面 Pods。因为动态证书重载目前还不被所有组件和证书支持,所有这项操作是必须的。 -[静态 Pods](/zh-cn/docs/tasks/configure-pod-container/static-pod/) 是被本地 kubelet 而不是 API Server 管理, -所以 kubectl 不能用来删除或重启他们。 +执行完此命令之后你需要重启控制面 Pod。因为动态证书重载目前还不被所有组件和证书支持,所有这项操作是必须的。 +[静态 Pod](/zh-cn/docs/tasks/configure-pod-container/static-pod/) 是被本地 kubelet +而不是 API 服务器管理,所以 kubectl 不能用来删除或重启他们。 要重启静态 Pod 你可以临时将清单文件从 `/etc/kubernetes/manifests/` 移除并等待 20 秒 -(参考 [KubeletConfiguration 结构](/zh-cn/docs/reference/config-api/kubelet-config.v1beta1/) 中的`fileCheckFrequency` 值)。 -如果 Pod 不在清单目录里,kubelet 将会终止它。 -在另一个 `fileCheckFrequency` 周期之后你可以将文件移回去,为了组件可以完成 kubelet 将重新创建 Pod 和证书更新。 +(参考 [KubeletConfiguration 结构](/zh-cn/docs/reference/config-api/kubelet-config.v1beta1/)中的 +`fileCheckFrequency` 值)。如果 Pod 不在清单目录里,kubelet 将会终止它。 +在另一个 `fileCheckFrequency` 周期之后你可以将文件移回去,kubelet 可以完成 Pod +的重建,而组件的证书更新操作也得以完成。 {{< warning >}}