Skip to content

Commit 4c58d58

Browse files
authored
Merge pull request #37797 from windsonsea/migpsp
[zh] sync migrate-from-psp.md
2 parents 9f3aead + 8a1afd4 commit 4c58d58

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

content/zh-cn/docs/tasks/configure-pod-container/migrate-from-psp.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,13 @@ admission controller. This can be done effectively using a combination of dry-ru
2929
{{% version-check %}}
3030

3131
<!--
32-
- Ensure the `PodSecurity` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/#feature-gates-for-alpha-or-beta-features) is enabled.
32+
If you are currently running a version of Kubernetes other than
33+
{{ skew currentVersion }}, you may want to switch to viewing this
34+
page in the documentation for the version of Kubernetes that you
35+
are actually running.
3336
-->
34-
- 确保 `PodSecurity` [特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)被启用。
37+
如果你目前运行的 Kubernetes 版本不是 {{ skew currentVersion }},
38+
你可能要切换本页面以查阅你实际所运行的 Kubernetes 版本文档。
3539

3640
<!--
3741
This page assumes you are already familiar with the basic [Pod Security Admission](/docs/concepts/security/pod-security-admission/)
@@ -141,7 +145,7 @@ to other policy enforcement mechanisms, and can provide a useful fallback runnin
141145
admission webhooks.
142146
-->
143147
即便 Pod 安全性准入无法满足你的所有需求,该机制也是设计用作其他策略实施机制的
144-
_补充_,因此可以和其他准入 Webhook 一起运行,进而提供一种有用的兜底机制。
148+
**补充**,因此可以和其他准入 Webhook 一起运行,进而提供一种有用的兜底机制。
145149

146150
<!--
147151
## 1. Review namespace permissions {#review-namespace-permissions}
@@ -164,8 +168,7 @@ Pod 安全性准入是通过[名字空间上的标签](/zh-cn/docs/concepts/secu
164168
名字空间的人都可以更改该名字空间的 Pod 安全性级别,而这可能会被利用来绕过约束性更强的策略。
165169
在继续执行迁移操作之前,请确保只有被信任的、有特权的用户具有这类名字空间访问权限。
166170
不建议将这类强大的访问权限授予不应获得权限提升的用户,不过如果你必须这样做,
167-
你需要使用一个
168-
[准入 Webhook](/zh-cn/docs/reference/access-authn-authz/extensible-admission-controllers/)
171+
你需要使用一个[准入 Webhook](/zh-cn/docs/reference/access-authn-authz/extensible-admission-controllers/)
169172
来针对为 Namespace 对象设置 Pod 安全性级别设置额外的约束。
170173

171174
<!--
@@ -185,8 +188,8 @@ policies](#psp-update-rollout) section below.
185188
针对要修改的、已存在的 PodSecurityPolicy,你应该将这里所建议的更改写入到其离线副本中。
186189
所克隆的 PSP 应该与原来的副本名字不同,并且按字母序要排到原副本之前
187190
(例如,可以向 PSP 名字前加一个 `0`)。
188-
先不要在 Kubernetes 中创建新的策略 - 这类操作会在后文的[推出更新的策略](#psp-update-rollout)
189-
部分讨论。
191+
先不要在 Kubernetes 中创建新的策略 -
192+
这类操作会在后文的[推出更新的策略](#psp-update-rollout)部分讨论。
190193

191194
<!--
192195
### 2.a. Eliminate purely mutating fields {#eliminate-mutating-fields}
@@ -504,7 +507,7 @@ kubectl label --dry-run=server --overwrite ns $NAMESPACE pod-security.kubernetes
504507
This command will return a warning for any _existing_ pods that are not valid under the proposed
505508
level.
506509
-->
507-
此命令会针对在所提议的级别下不再合法的所有 _现存_ Pod 返回警告信息。
510+
此命令会针对在所提议的级别下不再合法的所有 **现存** Pod 返回警告信息。
508511

509512
<!--
510513
The second option is better for catching workloads that are not currently running: audit mode. When
@@ -612,9 +615,8 @@ audit, and/or warn level for unlabeled namespaces. See
612615
for more information.
613616
-->
614617
你也可以静态配置 Pod 安全性准入控制器,为尚未打标签的名字空间设置默认的
615-
enforce、audit 与/或 warn 级别。详细信息可参阅
616-
[配置准入控制器](/zh-cn/docs/tasks/configure-pod-container/enforce-standards-admission-controller/#configure-the-admission-controller)
617-
页面。
618+
enforce、audit 与/或 warn 级别。
619+
详细信息可参阅[配置准入控制器](/zh-cn/docs/tasks/configure-pod-container/enforce-standards-admission-controller/#configure-the-admission-controller)页面。
618620

619621
<!--
620622
## 5. Disable PodSecurityPolicy {#disable-psp}

0 commit comments

Comments
 (0)