From 5526f4abd1b64970b74a7533f1a012545a74567e Mon Sep 17 00:00:00 2001 From: guzj11 <67083623+guzj11@users.noreply.github.com> Date: Sat, 12 Dec 2020 23:45:55 +0800 Subject: [PATCH] Update configure-runasusername.md Apply suggestions from code review Co-authored-by: Qiming Teng Update configure-runasusername.md apply suggestions --- .../configure-runasusername.md | 29 ++++++++----------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/content/zh/docs/tasks/configure-pod-container/configure-runasusername.md b/content/zh/docs/tasks/configure-pod-container/configure-runasusername.md index b64a51b2ab..19a9e4e71e 100644 --- a/content/zh/docs/tasks/configure-pod-container/configure-runasusername.md +++ b/content/zh/docs/tasks/configure-pod-container/configure-runasusername.md @@ -12,22 +12,13 @@ weight: 20 -{{< feature-state for_k8s_version="v1.17" state="beta" >}} +{{< feature-state for_k8s_version="v1.18" state="stable" >}} -本页展示如何为运行在 Windows 节点上的 pod 和容器启用并使用 `RunAsUserName` 功能。 -此功能旨在成为 Windows 版的 `runAsUser`(Linux),允许用户使用与默认用户名不同的 -用户名运行容器 entrypoint。 - - -{{< note >}} -此功能目前处于 Beta 状态。`RunAsUserName` 的整体功能不会出现变更, -但是关于用户名验证的部分可能会有所更改。 -{{< /note >}} +本页展示如何为运行为在 Windows 节点上运行的 Pod 和容器配置 `RunAsUserName` 。 +大致相当于 Linux 上的 `runAsUser`,允许在容器中以与默认值不同的用户名运行应用。 ## {{% heading "prerequisites" %}} @@ -45,9 +36,9 @@ To specify the username with which to execute the Pod's container processes, inc ## 为 Pod 设置 Username 要指定运行 Pod 容器时所使用的用户名,请在 Pod 声明中包含 `securityContext` -([PodSecurityContext](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#podsecuritycontext-v1-core))字段, +([PodSecurityContext](/zh/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#podsecuritycontext-v1-core))字段, 并在其内部包含 `windowsOptions` -([WindowsSecurityContextOptions](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#windowssecuritycontextoptions-v1-core)) +([WindowsSecurityContextOptions](/zh/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#windowssecuritycontextoptions-v1-core)) 字段的 `runAsUserName` 字段。