[zh]Update concepts pages(part-1) for links with '/zh/' prefix, using new prefix '/zh-cn/'

This commit is contained in:
howieyuen
2022-06-23 20:15:59 +08:00
parent e0d6f94bf6
commit 5e58c40edf
27 changed files with 219 additions and 219 deletions
@@ -74,8 +74,8 @@ In order to safely use Secrets, take at least the following steps:
为了安全地使用 Secret,请至少执行以下步骤:
1. 为 Secret [启用静态加密](/zh/docs/tasks/administer-cluster/encrypt-data/)
1. [启用或配置 RBAC 规则](/zh/docs/reference/access-authn-authz/authorization/)来限制读取和写入
1. 为 Secret [启用静态加密](/zh-cn/docs/tasks/administer-cluster/encrypt-data/)
1. [启用或配置 RBAC 规则](/zh-cn/docs/reference/access-authn-authz/authorization/)来限制读取和写入
Secret 的数据(包括通过间接方式)。需要注意的是,被准许创建 Pod 的人也隐式地被授权获取
Secret 内容。
1. 在适当的情况下,还可以使用 RBAC 等机制来限制允许哪些主体创建新 Secret 或替换现有 Secret。
@@ -139,7 +139,7 @@ Here are some of your options:
token).
-->
- 如果你的云原生组件需要执行身份认证来访问你所知道的、在同一 Kubernetes 集群中运行的另一个应用,
你可以使用 [ServiceAccount](/zh/docs/reference/access-authn-authz/authentication/#service-account-tokens)
你可以使用 [ServiceAccount](/zh-cn/docs/reference/access-authn-authz/authentication/#service-account-tokens)
及其令牌来标识你的客户端身份。
- 你可以运行的第三方工具也有很多,这些工具可以运行在集群内或集群外,提供机密数据管理。
例如,这一工具可能是 Pod 通过 HTTPS 访问的一个服务,该服务在客户端能够正确地通过身份认证
@@ -153,9 +153,9 @@ Here are some of your options:
trusted Pods onto nodes that provide a Trusted Platform Module, configured out-of-band.
-->
- 就身份认证而言,你可以为 X.509 证书实现一个定制的签名者,并使用
[CertificateSigningRequest](/zh/docs/reference/access-authn-authz/certificate-signing-requests/)
[CertificateSigningRequest](/zh-cn/docs/reference/access-authn-authz/certificate-signing-requests/)
来让该签名者为需要证书的 Pod 发放证书。
- 你可以使用一个[设备插件](/zh/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/)
- 你可以使用一个[设备插件](/zh-cn/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/)
来将节点本地的加密硬件暴露给特定的 Pod。例如,你可以将可信任的 Pod
调度到提供可信平台模块(Trusted Platform ModuleTPM)的节点上。
这类节点是另行配置的。
@@ -191,9 +191,9 @@ There are several options to create a Secret:
### 创建 Secret {#creating-a-secret}
- [使用 `kubectl` 命令来创建 Secret](/zh/docs/tasks/configmap-secret/managing-secret-using-kubectl/)
- [基于配置文件来创建 Secret](/zh/docs/tasks/configmap-secret/managing-secret-using-config-file/)
- [使用 kustomize 来创建 Secret](/zh/docs/tasks/configmap-secret/managing-secret-using-kustomize/)
- [使用 `kubectl` 命令来创建 Secret](/zh-cn/docs/tasks/configmap-secret/managing-secret-using-kubectl/)
- [基于配置文件来创建 Secret](/zh-cn/docs/tasks/configmap-secret/managing-secret-using-config-file/)
- [使用 kustomize 来创建 Secret](/zh-cn/docs/tasks/configmap-secret/managing-secret-using-kustomize/)
<!--
#### Constraints on Secret names and data {#restriction-names-data}
@@ -204,7 +204,7 @@ The name of a Secret object must be a valid
#### 对 Secret 名称与数据的约束 {#restriction-names-data}
Secret 对象的名称必须是合法的
[DNS 子域名](/zh/docs/concepts/overview/working-with-objects/names#dns-subdomain-names)。
[DNS 子域名](/zh-cn/docs/concepts/overview/working-with-objects/names#dns-subdomain-names)。
<!--
You can specify the `data` and/or the `stringData` field when creating a
@@ -242,7 +242,7 @@ number of Secrets (or other resources) in a namespace.
每个 Secret 的尺寸最多为 1MiB。施加这一限制是为了避免用户创建非常大的 Secret,
进而导致 API 服务器和 kubelet 内存耗尽。不过创建很多小的 Secret 也可能耗尽内存。
你可以使用[资源配额](/zh/docs/concepts/policy/resource-quotas/)来约束每个名字空间中
你可以使用[资源配额](/zh-cn/docs/concepts/policy/resource-quotas/)来约束每个名字空间中
Secret(或其他资源)的个数。
<!--
@@ -438,7 +438,7 @@ Kubernetes v1.22 版本之前都会自动创建用来访问 Kubernetes API 的
这一老的机制是基于创建可被挂载到 Pod 中的令牌 Secret 来实现的。
在最近的版本中,包括 Kubernetes v{{< skew currentVersion >}} 中,API 凭据是直接通过
[TokenRequest](/docs/reference/kubernetes-api/authentication-resources/token-request-v1/)
API 来获得的,这一凭据会使用[投射卷](/zh/docs/reference/access-authn-authz/service-accounts-admin/#bound-service-account-token-volume)
API 来获得的,这一凭据会使用[投射卷](/zh-cn/docs/reference/access-authn-authz/service-accounts-admin/#bound-service-account-token-volume)
挂载到 Pod 中。使用这种方式获得的令牌有确定的生命期,并且在挂载它们的 Pod
被删除时自动作废。
@@ -450,7 +450,7 @@ subresource to obtain a token to access the API is recommended instead.
You can use the [`kubectl create token`](/docs/reference/generated/kubectl/kubectl-commands#-em-token-em-)
command to obtain a token from the `TokenRequest` API.
-->
你仍然可以[手动创建](/zh/docs/tasks/configure-pod-container/configure-service-account/#manually-create-a-service-account-api-token)
你仍然可以[手动创建](/zh-cn/docs/tasks/configure-pod-container/configure-service-account/#manually-create-a-service-account-api-token)
服务账号令牌。例如,当你需要一个永远都不过期的令牌时。
不过,仍然建议使用 [TokenRequest](/docs/reference/kubernetes-api/authentication-resources/token-request-v1/)
子资源来获得访问 API 服务器的令牌。
@@ -648,7 +648,7 @@ A container using a Secret as a
[subPath](/docs/concepts/storage/volumes#using-subpath) volume mount does not receive
automated Secret updates.
-->
对于以 [subPath](/zh/docs/concepts/storage/volumes#using-subpath) 形式挂载 Secret 卷的容器而言,
对于以 [subPath](/zh-cn/docs/concepts/storage/volumes#using-subpath) 形式挂载 Secret 卷的容器而言,
它们无法收到自动的 Secret 更新。
{{< /note >}}
@@ -660,7 +660,7 @@ the [kubelet configuration](/docs/reference/config-api/kubelet-config.v1beta1/)
-->
Kubelet 组件会维护一个缓存,在其中保存节点上 Pod 卷中使用的 Secret 的当前主键和取值。
你可以配置 kubelet 如何检测所缓存数值的变化。
[kubelet 配置](/zh/docs/reference/config-api/kubelet-config.v1beta1/)中的
[kubelet 配置](/zh-cn/docs/reference/config-api/kubelet-config.v1beta1/)中的
`configMapAndSecretChangeDetectionStrategy` 字段控制 kubelet 所采用的策略。
默认的策略是 `Watch`
@@ -886,7 +886,7 @@ documentation.
-->
##### 手动设定 imagePullSecret {#manually-specifying-an-imagepullsecret}
你可以通过阅读[容器镜像](/zh/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod)
你可以通过阅读[容器镜像](/zh-cn/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod)
文档了解如何设置 `imagePullSecrets`
<!--
@@ -904,7 +904,7 @@ See [Add ImagePullSecrets to a service account](/docs/tasks/configure-pod-contai
你可以手动创建 `imagePullSecret`,并在一个 ServiceAccount 中引用它。
对使用该 ServiceAccount 创建的所有 Pod,或者默认使用该 ServiceAccount 创建的 Pod
而言,其 `imagePullSecrets` 字段都会设置为该服务账号。
请阅读[向服务账号添加 ImagePullSecrets](/zh/docs/tasks/configure-pod-container/configure-service-account/#add-imagepullsecrets-to-a-service-account)
请阅读[向服务账号添加 ImagePullSecrets](/zh-cn/docs/tasks/configure-pod-container/configure-service-account/#add-imagepullsecrets-to-a-service-account)
来详细了解这一过程。
<!--
@@ -1549,7 +1549,7 @@ You can also check the `automountServiceAccountToken` field and the
[`Pod`](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#pod-v1-core)
for information on referencing service account credentials from within Pods.
-->
参考 [ServiceAccount](/zh/docs/tasks/configure-pod-container/configure-service-account/)
参考 [ServiceAccount](/zh-cn/docs/tasks/configure-pod-container/configure-service-account/)
文档了解服务账号的工作原理。你也可以查看
[`Pod`](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#pod-v1-core)
资源中的 `automountServiceAccountToken``serviceAccountName` 字段文档,
@@ -1814,7 +1814,7 @@ The following YAML contains an example config for a TLS Secret:
Kubernetes 提供一种内置的 `kubernetes.io/tls` Secret 类型,用来存放 TLS
场合通常要使用的证书及其相关密钥。
TLS Secret 的一种典型用法是为 [Ingress](/zh/docs/concepts/services-networking/ingress/)
TLS Secret 的一种典型用法是为 [Ingress](/zh-cn/docs/concepts/services-networking/ingress/)
资源配置传输过程中的数据加密,不过也可以用于其他资源或者直接在负载中使用。
当使用此类型的 Secret 时,Secret 配置中的 `data` (或 `stringData`)字段必须包含
`tls.key``tls.crt` 主键,尽管 API 服务器实际上并不会对每个键的取值作进一步的合法性检查。
@@ -2164,8 +2164,8 @@ on that node.
[authorization policies](/docs/reference/access-authn-authz/authorization/) such as
[RBAC](/docs/reference/access-authn-authz/rbac/).
-->
- 部署与 Secret API 交互的应用时,你应该使用 [RBAC](/zh/docs/reference/access-authn-authz/rbac/)
这类[鉴权策略](/zh/docs/reference/access-authn-authz/authorization/)来限制访问。
- 部署与 Secret API 交互的应用时,你应该使用 [RBAC](/zh-cn/docs/reference/access-authn-authz/rbac/)
这类[鉴权策略](/zh-cn/docs/reference/access-authn-authz/authorization/)来限制访问。
<!--
- In the Kubernetes API, `watch` and `list` requests for Secrets within a namespace
are extremely powerful capabilities. Avoid granting this access where feasible, since
@@ -2203,8 +2203,8 @@ Pod 来访问 Secret 的内容。
- 保留(使用 Kubernetes API)对集群中所有 Secret 对象执行 `watch``list` 操作的能力,
这样只有特权级最高、系统级别的组件能够执行这类操作。
- 在部署需要通过 Secret API 交互的应用时,你应该通过使用
[RBAC](/zh/docs/reference/access-authn-authz/rbac/)
这类[鉴权策略](/zh/docs/reference/access-authn-authz/authorization/)来限制访问。
[RBAC](/zh-cn/docs/reference/access-authn-authz/rbac/)
这类[鉴权策略](/zh-cn/docs/reference/access-authn-authz/authorization/)来限制访问。
<!--
- In the API server, objects (including Secrets) are persisted into
{{< glossary_tooltip term_id="etcd" >}}; therefore:
@@ -2221,7 +2221,7 @@ Pod 来访问 Secret 的内容。
因此:
- 只应准许集群管理员访问 etcd(包括只读访问);
- 为 Secret 对象启用[静态加密](/zh/docs/tasks/administer-cluster/encrypt-data/)
- 为 Secret 对象启用[静态加密](/zh-cn/docs/tasks/administer-cluster/encrypt-data/)
这样这些 Secret 的数据就不会以明文的形式保存到
{{< glossary_tooltip term_id="etcd" >}} 中;
- 当 etcd 的持久化存储不再被使用时,请考虑彻底擦除存储介质;
@@ -2235,8 +2235,8 @@ Pod 来访问 Secret 的内容。
- Learn how to [manage Secrets using kustomize](/docs/tasks/configmap-secret/managing-secret-using-kustomize/)
- Read the [API reference](/docs/reference/kubernetes-api/config-and-storage-resources/secret-v1/) for `Secret`
-->
- 学习如何[使用 `kubectl` 管理 Secret](/zh/docs/tasks/configmap-secret/managing-secret-using-kubectl/)
- 学习如何[使用配置文件管理 Secret](/zh/docs/tasks/configmap-secret/managing-secret-using-config-file/)
- 学习如何[使用 kustomize 管理 Secret](/zh/docs/tasks/configmap-secret/managing-secret-using-kustomize/)
- 阅读 [API 参考](/zh/docs/reference/kubernetes-api/config-and-storage-resources/secret-v1/)了解 `Secret`
- 学习如何[使用 `kubectl` 管理 Secret](/zh-cn/docs/tasks/configmap-secret/managing-secret-using-kubectl/)
- 学习如何[使用配置文件管理 Secret](/zh-cn/docs/tasks/configmap-secret/managing-secret-using-config-file/)
- 学习如何[使用 kustomize 管理 Secret](/zh-cn/docs/tasks/configmap-secret/managing-secret-using-kustomize/)
- 阅读 [API 参考](/zh-cn/docs/reference/kubernetes-api/config-and-storage-resources/secret-v1/)了解 `Secret`