Skip to content

Commit

Permalink
[zh-cn] sync encrypt-data create-cluster-kubeadm encrypt-data localiz…
Browse files Browse the repository at this point in the history
…ation

Signed-off-by: xin.li <xin.li@daocloud.io>
  • Loading branch information
my-git9 committed Feb 21, 2024
1 parent 75ad0a2 commit 9526541
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 30 deletions.
16 changes: 12 additions & 4 deletions content/zh-cn/docs/contribute/localization.md
Expand Up @@ -341,13 +341,21 @@ script and use it in the theme. Assign "language name in latin script" to
例如,`languageNameLatinScript ="Korean"``languageNameLatinScript = "Deutsch"`

<!--
When assigning a `weight` parameter for your block, find the language block with
the highest weight and add 1 to that value.
The `weight` parameter determines the order of languages in the language selection bar.
A lower weight takes precedence, resulting in the language appearing first.
When assigning the `weight` parameter, it is important to examine the existing languages
block and adjust their weights to ensure they are in a sorted order relative to all languages,
including any newly added language.
-->
`weight` 参数决定语言选择栏中的语言顺序,
优先显示权重较低的语言。
分配 `weight` 参数时,检查现有语言块并调整其权重以确保它们相对于所有语言
(包括任何新添加的语言)按排序顺序非常重要。

<!--
For more information about Hugo's multilingual support, see
"[Multilingual Mode](https://gohugo.io/content-management/multilingual/)".
-->
为你的语言块分配一个 `weight` 参数时,找到权重最高的语言块并将其加 1。

有关 Hugo 多语言支持的更多信息,请参阅"[多语言模式](https://gohugo.io/content-management/multilingual/)"。

Expand Down Expand Up @@ -781,7 +789,7 @@ German (`de`):
[`data/i18n/en/en.toml`](https://github.com/kubernetes/website/blob/main/data/i18n/en/en.toml)
的内容。以德语为例:`data/i18n/de/de.toml`

将新的本地化文件和目录添加到 `data/i18n/`。例如德语 (`de`)
将新的本地化文件和目录添加到 `data/i18n/`。例如德语`de`

```bash
mkdir -p data/i18n/de
Expand Down
Expand Up @@ -1072,11 +1072,11 @@ Example:
### kubeadm 中 kubelet 的版本偏差 {#kubeadm-s-skew-against-the-kubelet}

<!--
Similarly to the Kubernetes version, kubeadm can be used with a kubelet version that is the same
version as kubeadm or one version older.
Similarly to the Kubernetes version, kubeadm can be used with a kubelet version that is
the same version as kubeadm or three version older.
-->
与 Kubernetes 版本类似,kubeadm 可以使用与 kubeadm 相同版本的 kubelet,
或者比 kubeadm 老一个版本的 kubelet。
或者比 kubeadm 老三个版本的 kubelet。

<!--
Example:
Expand Down
Expand Up @@ -227,7 +227,7 @@ before CoreDNS may be deployed fully. Hence the `Pending` state before the netwo
-->
## `coredns` 停滞在 `Pending` 状态

这一行为是 **预期之中** 的,因为系统就是这么设计的。kubeadm 的网络供应商是中立的,
这一行为是**预期之中**的,因为系统就是这么设计的。kubeadm 的网络供应商是中立的,
因此管理员应该选择[安装 Pod 的网络插件](/zh-cn/docs/concepts/cluster-administration/addons/)
你必须完成 Pod 的网络配置,然后才能完全部署 CoreDNS。
在网络被配置好之前,DNS 组件会一直处于 `Pending` 状态。
Expand Down Expand Up @@ -258,8 +258,8 @@ or use `HostNetwork=true`.
有关更多信息,请参考 [CNI portmap 文档](https://github.com/containernetworking/plugins/blob/master/plugins/meta/portmap/README.md).

如果你的网络提供商不支持 portmap CNI 插件,你或许需要使用
[NodePort 服务的功能](/zh-cn/docs/concepts/services-networking/service/#type-nodeport)
或者使用 `HostNetwork=true`
[NodePort 服务的功能](/zh-cn/docs/concepts/services-networking/service/#type-nodeport)或者使用
`HostNetwork=true`

<!--
## Pods are not accessible via their Service IP
Expand All @@ -284,7 +284,8 @@ or use `HostNetwork=true`.

- 如果你正在使用 VirtualBox (直接使用或者通过 Vagrant 使用),你需要
确保 `hostname -i` 返回一个可路由的 IP 地址。默认情况下,第一个接口连接不能路由的仅主机网络。
解决方法是修改 `/etc/hosts`,请参考示例 [Vagrantfile](https://github.com/errordeveloper/k8s-playground/blob/22dd39dfc06111235620e6c4404a96ae146f26fd/Vagrantfile#L11)
解决方法是修改 `/etc/hosts`,请参考示例
[Vagrantfile](https://github.com/errordeveloper/k8s-playground/blob/22dd39dfc06111235620e6c4404a96ae146f26fd/Vagrantfile#L11)

<!--
## TLS certificate errors
Expand Down Expand Up @@ -359,15 +360,16 @@ in kube-apiserver logs. To fix the issue you must follow these steps:
`kubeadm kubeconfig user --org system:nodes --client-name system:node:$NODE > kubelet.conf`.
`$NODE` must be set to the name of the existing failed node in the cluster.
Modify the resulted `kubelet.conf` manually to adjust the cluster name and server endpoint,
or pass `kubeconfig user --config` (it accepts `InitConfiguration`). If your cluster does not have
(see [Generating kubeconfig files for additional users](/docs/tasks/administer-cluster/kubeadm/kubeadm-certs/#kubeconfig-additional-users)). If your cluster does not have
the `ca.key` you must sign the embedded certificates in the `kubelet.conf` externally.
-->
1. 从故障节点备份和删除 `/etc/kubernetes/kubelet.conf``/var/lib/kubelet/pki/kubelet-client*`
2. 在集群中具有 `/etc/kubernetes/pki/ca.key` 的、正常工作的控制平面节点上
执行 `kubeadm kubeconfig user --org system:nodes --client-name system:node:$NODE > kubelet.conf`
`$NODE` 必须设置为集群中现有故障节点的名称。
手动修改生成的 `kubelet.conf` 以调整集群名称和服务器端点,
或传递 `kubeconfig user --config`(此命令接受 `InitConfiguration`)。
或传递 `kubeconfig user --config`
(请参阅[为其他用户生成 kubeconfig 文件](/zh-cn/docs/tasks/administer-cluster/kubeadm/kubeadm-certs/#kubeconfig-additional-users))。
如果你的集群没有 `ca.key`,你必须在外部对 `kubelet.conf` 中的嵌入式证书进行签名。
<!--
1. Copy this resulted `kubelet.conf` to `/etc/kubernetes/kubelet.conf` on the failed node.
Expand Down Expand Up @@ -681,7 +683,7 @@ for the feature to work.
在支持 [FlexVolume](https://github.com/kubernetes/community/blob/ab55d85/contributors/devel/sig-storage/flexvolume.md) 时,
类似 kubelet 和 kube-controller-manager 这类 Kubernetes 组件使用默认路径
`/usr/libexec/kubernetes/kubelet-plugins/volume/exec/`
而 FlexVolume 的目录 **必须是可写入的**,该功能特性才能正常工作。
而 FlexVolume 的目录**必须是可写入的**,该功能特性才能正常工作。

{{< note >}}
<!--
Expand Down
63 changes: 47 additions & 16 deletions content/zh-cn/docs/tasks/administer-cluster/encrypt-data.md
Expand Up @@ -314,28 +314,57 @@ are determined by the order it's listed in the configuration.
{{< /note >}}

<!--
Opting out of encryption for specific resources while wildcard is enabled can be achieved by adding a new
`resources` array item with the resource name, followed by the `providers` array item with the `identity` provider.
For example, if '`*.*`' is enabled and you want to opt-out encryption for the `events` resource, add a new item
to the `resources` array with `events` as the resource name, followed by the providers array item with `identity`.
The new item should look like this:
If you have a wildcard covering resources and want to opt out of at-rest encryption for a particular kind
of resource, you achieve that by adding a separate `resources` array item with the name of the resource that
you want to exempt, followed by a `providers` array item where you specify the `identity` provider. You add
this item to the list so that it appears earlier than the configuration where you do specify encryption
(a provider that is not `identity`).
-->
如果启用了通配符,但想要针对特定资源退出加密,则可以通过添加带有资源名称的新 `resources` 数组项
后跟附带 `identity` 提供商的 `providers` 数组项。例如,如果启用了 “`*.*`
但想要排除对 `events` 资源的加密,则应向 `resources` 数组添加一个新项(以 `events` 为资源名称),
后跟包含 `identity` 的提供程序数组。新项应如下所示:
如果你有一个涵盖资源(resource)的通配符,并且想要过滤掉静态加密的特定类型资源
则可以通过添加一个单独的 `resources` 数组项来实现此目的
其中包含要豁免的资源的名称,还可以在其后跟一个 `providers` 数组项来指定 `identity` 提供商。
你可以将此数组项添加到列表中,以便它早于你指定加密的配置(不是 `identity` 的提供商)出现。

<!--
For example, if '`*.*`' is enabled and you want to opt out of encryption for Events and ConfigMaps, add a
new **earlier** item to the `resources`, followed by the providers array item with `identity` as the
provider. The more specific entry must come before the wildcard entry.
The new item would look similar to:
-->
例如,如果启用了 '`*.*`',并且你想要选择不加密 Event 和 ConfigMap,
请在 `resources`**靠前**的位置添加一个新的条目,后跟带有 `identity`
的 providers 数组项作为提供程序。较为特定的条目必须位于通配符条目之前。

新项目看起来类似于:

<!--
```yaml
- resources:
- events
providers:
- identity: {}
...
- resources:
- configmaps. # specifically from the core API group,
# because of trailing "."
- events
providers:
- identity: {}
# and then other entries in resources
```
-->
```yaml
...
- resources:
- configmaps. # 特定于来自核心 API 组的资源,因为结尾是 “.”
- events
providers:
- identity: {}
# 然后是资源中的其他条目
```

<!--
Ensure that the new item is listed before the wildcard '`*.*`' item in the resources array to give it precedence.
Ensure that the new item is listed _before_ the wildcard '`*.*`' item in the resources array
to give it precedence.
-->
确保新项列在资源数组中的通配符 “`*.*`项之前,使新项优先。
确保新项列在资源数组中的通配符 “`*.*`**之前**,使新项优先。

<!--
For more detailed information about the `EncryptionConfiguration` struct, please refer to the
Expand Down Expand Up @@ -396,7 +425,9 @@ Kubernetes 静态数据加密的提供程序
<tr>
<td colspan="4">
<!--
Resources written as-is without encryption. When set as the first provider, the resource will be decrypted as new values are written. Existing encrypted resources are <strong>not</strong> automatically overwritten with the plaintext data.
Resources written as-is without encryption. When set as the first provider,
the resource will be decrypted as new values are written.
Existing encrypted resources are <strong>not</strong> automatically overwritten with the plaintext data.
The <tt>identity</tt> provider is the default if you do not specify otherwise.
-->
不加密写入的资源。当设置为第一个提供程序时,已加密的资源将在新值写入时被解密。
Expand Down

0 comments on commit 9526541

Please sign in to comment.