Skip to content

Commit c3d0908

Browse files
authored
Merge pull request #25583 from guzj11/patch-20
Update configure-runasusername.md
2 parents 808dfd4 + 5526f4a commit c3d0908

File tree

1 file changed

+12
-17
lines changed

1 file changed

+12
-17
lines changed

content/zh/docs/tasks/configure-pod-container/configure-runasusername.md

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,13 @@ weight: 20
1212

1313
<!-- overview -->
1414

15-
{{< feature-state for_k8s_version="v1.17" state="beta" >}}
15+
{{< feature-state for_k8s_version="v1.18" state="stable" >}}
1616

1717
<!--
18-
This page shows how to enable and use the `RunAsUserName` feature for pods and containers that will run on Windows nodes. This feature is meant to be the Windows equivalent of the Linux-specific `runAsUser` feature, allowing users to run the container entrypoints with a different username that their default ones.
18+
This page shows how to use the `runAsUserName` setting for Pods and containers that will run on Windows nodes. This is roughly equivalent of the Linux-specific `runAsUser` setting, allowing you to run applications in a container as a different username than the default.
1919
-->
20-
本页展示如何为运行在 Windows 节点上的 pod 和容器启用并使用 `RunAsUserName` 功能。
21-
此功能旨在成为 Windows 版的 `runAsUser`(Linux),允许用户使用与默认用户名不同的
22-
用户名运行容器 entrypoint。
23-
24-
<!--
25-
This feature is in beta. The overall functionality for `RunAsUserName` will not change, but there may be some changes regarding the username validation.
26-
-->
27-
{{< note >}}
28-
此功能目前处于 Beta 状态。`RunAsUserName` 的整体功能不会出现变更,
29-
但是关于用户名验证的部分可能会有所更改。
30-
{{< /note >}}
20+
本页展示如何为运行为在 Windows 节点上运行的 Pod 和容器配置 `RunAsUserName`
21+
大致相当于 Linux 上的 `runAsUser`,允许在容器中以与默认值不同的用户名运行应用。
3122

3223
## {{% heading "prerequisites" %}}
3324

@@ -45,9 +36,9 @@ To specify the username with which to execute the Pod's container processes, inc
4536
## 为 Pod 设置 Username
4637

4738
要指定运行 Pod 容器时所使用的用户名,请在 Pod 声明中包含 `securityContext`
48-
[PodSecurityContext](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#podsecuritycontext-v1-core))字段,
39+
[PodSecurityContext](/zh/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#podsecuritycontext-v1-core))字段,
4940
并在其内部包含 `windowsOptions`
50-
[WindowsSecurityContextOptions](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#windowssecuritycontextoptions-v1-core))
41+
[WindowsSecurityContextOptions](/zh/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#windowssecuritycontextoptions-v1-core))
5142
字段的 `runAsUserName` 字段。
5243

5344
<!--
@@ -120,7 +111,12 @@ To specify the username with which to execute a Container's processes, include t
120111

121112
## 为容器设置 Username
122113

123-
要指定运行容器时所使用的用户名,请在容器清单中包含 `securityContext`[SecurityContext](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#securitycontext-v1-core))字段,并在其内部包含 `windowsOptions`[WindowsSecurityContextOptions](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#windowssecuritycontextoptions-v1-core))字段的 `runAsUserName` 字段。
114+
要指定运行容器时所使用的用户名,请在容器清单中包含 `securityContext`
115+
[SecurityContext](/zh/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#securitycontext-v1-core))
116+
字段,并在其内部包含 `windowsOptions`
117+
[WindowsSecurityContextOptions](/zh/docs/reference/generated/kubernetes-api/{{< param
118+
"version" >}}/#windowssecuritycontextoptions-v1-core))
119+
字段的 `runAsUserName` 字段。
124120

125121
<!--
126122
The Windows security context options that you specify for a Container apply only to that individual Container, and they override the settings made at the Pod level.
@@ -222,4 +218,3 @@ For more information about these limtations, check [here](https://support.micros
222218
* [Kubernetes 中调度 Windows 容器的指南](/zh/docs/setup/production-environment/windows/user-guide-windows-containers/)
223219
* [使用组托管服务帐户(GMSA)管理工作负载身份](/zh/docs/setup/production-environment/windows/user-guide-windows-containers/#managing-workload-identity-with-group-managed-service-accounts)
224220
* [Windows 下 pod 和容器的 GMSA 配置](/zh/docs/tasks/configure-pod-container/configure-gmsa/)
225-

0 commit comments

Comments
 (0)