From ef49d6613974d6dfc9f078cd71121239a7df2e96 Mon Sep 17 00:00:00 2001 From: caodonghui Date: Tue, 18 May 2021 15:35:20 +0800 Subject: [PATCH] [zh]Resync tasks files[7] --- .../configure-pod-container/configure-gmsa.md | 2 +- .../configure-pod-configmap.md | 9 +++++++ .../configure-service-account.md | 26 +++++++++---------- .../pull-image-private-registry.md | 10 ++++--- 4 files changed, 28 insertions(+), 19 deletions(-) diff --git a/content/zh/docs/tasks/configure-pod-container/configure-gmsa.md b/content/zh/docs/tasks/configure-pod-container/configure-gmsa.md index 95a80ea123..3687f9b918 100644 --- a/content/zh/docs/tasks/configure-pod-container/configure-gmsa.md +++ b/content/zh/docs/tasks/configure-pod-container/configure-gmsa.md @@ -479,7 +479,7 @@ If you add the `lifecycle` section show above to your Pod spec, the Pod will exe ## GMSA 的局限 {#gmsa-limitations} diff --git a/content/zh/docs/tasks/configure-pod-container/configure-pod-configmap.md b/content/zh/docs/tasks/configure-pod-container/configure-pod-configmap.md index 2399e89ad7..ddbf118dbc 100644 --- a/content/zh/docs/tasks/configure-pod-container/configure-pod-configmap.md +++ b/content/zh/docs/tasks/configure-pod-container/configure-pod-configmap.md @@ -293,8 +293,17 @@ how.nice.to.look=fairlyNice ``` +当 `kubectl` 基于非 ASCII 或 UTF-8 的输入创建 ConfigMap 时, +该工具将这些输入放入 ConfigMap 的 `binaryData` 字段,而不是 `data` 中。 +同一个 ConfigMap 中可同时包含文本数据和二进制数据源。 +如果你想查看 ConfigMap 中的 `binaryData` 键(及其值), +你可以运行 `kubectl get configmap -o jsonpath='{.binaryData}' `。 + 使用 `--from-env-file` 选项从环境文件创建 ConfigMap,例如: 那么你就能看到系统已经自动创建了一个令牌并且被服务账户所引用。 @@ -198,7 +198,7 @@ field of a pod to the name of the service account you wish to use. 你可以使用授权插件来 [设置服务账户的访问许可](/zh/docs/reference/access-authn-authz/rbac/#service-account-permissions)。 -要使用非默认的服务账户,只需简单的将 Pod 的 `spec.serviceAccountName` 字段设置为你想用的服务账户名称。 +要使用非默认的服务账户,将 Pod 的 `spec.serviceAccountName` 字段设置为你想用的服务账户名称。 ## 发现服务账号分发者 -{{< feature-state for_k8s_version="v1.20" state="beta" >}} +{{< feature-state for_k8s_version="v1.21" state="stable" >}} -通过启用 `ServiceAccountIssuerDiscovery` -[特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates), -并按[前文所述](#service-account-token-volume-projection)启用服务账号令牌投射, -可以启用发现服务账号分发者(Service Account Issuer Discovery)这一功能特性。 +当启用服务账号令牌投射时启用发现服务账号分发者(Service Account Issuer Discovery)这一功能特性, +如[上文所述](#service-account-token-volume-projection)。 -特性被启用时,集群也会配置名为 `system:service-account-issuer-discovery` -的默认 RBAC ClusterRole,但默认情况下不提供角色绑定对象。 +集群包括一个默认的 RBAC ClusterRole, +名为 `system:service-account-issuer-discovery`。 +默认情况下不提供角色绑定对象。 举例而言,管理员可以根据其安全性需要以及期望集成的外部系统选择是否将该角色绑定到 `system:authenticated` 或 `system:unauthenticated`。 diff --git a/content/zh/docs/tasks/configure-pod-container/pull-image-private-registry.md b/content/zh/docs/tasks/configure-pod-container/pull-image-private-registry.md index f9e4389762..6ddd85537b 100644 --- a/content/zh/docs/tasks/configure-pod-container/pull-image-private-registry.md +++ b/content/zh/docs/tasks/configure-pod-container/pull-image-private-registry.md @@ -109,7 +109,8 @@ kubectl create secret docker-registry regcred \ ## 检查 Secret `regcred` @@ -231,7 +232,8 @@ janedoe/jdoe-private:v1