fix some document format errors

This commit is contained in:
bryan
2020-04-30 09:22:27 +08:00
parent cde3dfadae
commit 143825a049
@@ -191,7 +191,7 @@ secret data as unencoded strings.
#### 手动创建 Secret #### 手动创建 Secret
您也可以先以 json 或 yaml 格式在文件中创建一个 secret 对象,然后创建该对象。 您也可以先以 json 或 yaml 格式在文件中创建一个 secret 对象,然后创建该对象。
[密码](/docs/reference/generated/kubernetes-api/v1.12/#secret-v1-core)包含两类型,数据和字符串数据。 [密码](/docs/reference/generated/kubernetes-api/v1.12/#secret-v1-core)包含两类型,数据和字符串数据。
数据字段用于存储使用 base64 编码的任意数据。 提供 stringData 字段是为了方便起见,它允许您将机密数据作为未编码的字符串提供。 数据字段用于存储使用 base64 编码的任意数据。 提供 stringData 字段是为了方便起见,它允许您将机密数据作为未编码的字符串提供。
<!-- <!--
@@ -376,11 +376,7 @@ the option `-w 0` to `base64` commands or the pipeline `base64 | tr -d '\n'` if
data 和 stringData 的键必须由字母数字字符 '-', '_' 或者 '.' 组成。 data 和 stringData 的键必须由字母数字字符 '-', '_' 或者 '.' 组成。
** 编码注意:** 秘密数据的序列化 JSON 和 YAML 值被编码为base64字符串 ** 编码注意:** 秘密数据的序列化 JSON 和 YAML 值被编码为 base64 字符串。换行符在这些字符串中无效,因此必须省略。在 Darwin/macOS 上使用 `base64` 实用程序时,用户应避免使用 `-b` 选项来分隔长行。相反,Linux用户 *应该*`base64` 命令中添加选项 `-w 0` ,或者,如果 `-w` 选项不可用的情况下,执行 `base64 | tr -d '\n'`
换行符在这些字符串中无效,因此必须省略。
在 Darwin / macOS 上使用 `base64` 实用程序时,用户应避免使用 `-b` 选项来分隔长行。
相反,Linux用户 *应该*`base64` 命令中添加选项 `-w 0` 或者,如果`-w`选项不可用的情况下,
执行 `base64 | tr -d '\n'`
<!-- <!--
#### Creating a Secret from Generator #### Creating a Secret from Generator
@@ -396,7 +392,7 @@ For example, to generate a Secret from files `./username.txt` and `./password.tx
#### 从生成器创建 Secret #### 从生成器创建 Secret
Kubectl 从 1.14 版本开始支持 [使用 Kustomize 管理对象](/docs/tasks/manage-kubernetes-objects/kustomization/) Kubectl 从 1.14 版本开始支持 [使用 Kustomize 管理对象](/docs/tasks/manage-kubernetes-objects/kustomization/)
使用此新功能,您还可以从生成器创建一个 Secret,然后将其应用于在 Apiserver 上创建对象。 使用此新功能,您还可以从生成器创建一个 Secret,然后将其应用于在 Apiserver 上创建对象。
生成器应在目录内的 kustomization.yaml中指定。 生成器应在目录内的 `kustomization.yaml` 中指定。
例如,从文件 `./username.txt``./password.txt` 生成一个 Secret。 例如,从文件 `./username.txt``./password.txt` 生成一个 Secret。
@@ -476,8 +472,7 @@ The generated Secrets name has a suffix appended by hashing the contents. This e
Secret is generated each time the contents is modified. Secret is generated each time the contents is modified.
--> -->
通过对内容进行序列化后,生成一个后缀作为 Secrets 的名称。 通过对内容进行序列化后,生成一个后缀作为 Secrets 的名称。这样可以确保每次修改内容时都会生成一个新的 Secret。
这样可以确保每次修改内容时都会生成一个新的Secret。
{{< /note >}} {{< /note >}}
@@ -832,9 +827,7 @@ when new keys are projected to the Pod can be as long as kubelet sync period + c
propagation delay, where cache propagation delay depends on the chosen cache type propagation delay, where cache propagation delay depends on the chosen cache type
(it equals to watch propagation delay, ttl of cache, or zero corespondingly). (it equals to watch propagation delay, ttl of cache, or zero corespondingly).
--> -->
当已经在 volume 中被消费的 secret 被更新时,被映射的 key 也将被更新。 当已经在 volume 中被消费的 secret 被更新时,被映射的 key 也将被更新。Kubelet 在周期性同步时检查被挂载的 secret 是不是最新的。但是,它正在使用其本地缓存来获取 Secret 的当前值。
Kubelet 在周期性同步时检查被挂载的 secret 是不是最新的。
但是,它正在使用其本地缓存来获取 Secret 的当前值。
缓存的类型可以使用 (`ConfigMapAndSecretChangeDetectionStrategy` 中的 [KubeletConfiguration 结构](https://github.com/kubernetes/kubernetes/blob/{{< param "docsbranch" >}}/staging/src/k8s.io/kubelet/config/v1beta1/types.go)). 缓存的类型可以使用 (`ConfigMapAndSecretChangeDetectionStrategy` 中的 [KubeletConfiguration 结构](https://github.com/kubernetes/kubernetes/blob/{{< param "docsbranch" >}}/staging/src/k8s.io/kubelet/config/v1beta1/types.go)).
它可以通过基于 ttl 的 watch(默认)传播,也可以将所有请求直接重定向到直接kube-apiserver。 它可以通过基于 ttl 的 watch(默认)传播,也可以将所有请求直接重定向到直接kube-apiserver。
@@ -877,8 +870,7 @@ To use this feature, enable the `ImmutableEmphemeralVolumes`
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/) and set [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) and set
your Secret or ConfigMap `immutable` field to `true`. For example: your Secret or ConfigMap `immutable` field to `true`. For example:
--> -->
使用这个特性需要启用 `ImmutableEmphemeralVolumes` 使用这个特性需要启用 `ImmutableEmphemeralVolumes` [特性开关](/docs/reference/command-line-tools-reference/feature-gates/) 并将 Secret 或 ConfigMap 的 `immutable` 字段设置为 `true`. 例如:
[特性开关](/docs/reference/command-line-tools-reference/feature-gates/) 并将 Secret 或 ConfigMap 的 `immutable` 字段设置为 `true`. 例如:
```yaml ```yaml
apiVersion: v1 apiVersion: v1