Skip to content

Commit 7283e0c

Browse files
authored
Merge pull request #33458 from zyy19981018/zyy17
[zh]Update content/zh/docs/concepts/security/pod-security-admission.md
2 parents 7b6878a + f847a81 commit 7283e0c

File tree

1 file changed

+26
-23
lines changed

1 file changed

+26
-23
lines changed

content/zh/docs/concepts/security/pod-security-admission.md

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Kubernetes [Pod 安全性标准(Security Standards)](/zh/docs/concepts/secur
3333
为 Pod 定义不同的隔离级别。这些标准能够让你以一种清晰、一致的方式定义如何限制 Pod 行为。
3434

3535
<!--
36-
As a Beta feature, Kubernetes offers a built-in _Pod Security_ {{< glossary_tooltip
36+
As a beta feature, Kubernetes offers a built-in _Pod Security_ {{< glossary_tooltip
3737
text="admission controller" term_id="admission-controller" >}}, the successor
3838
to [PodSecurityPolicies](/docs/concepts/security/pod-security-policy/). Pod security restrictions
3939
are applied at the {{< glossary_tooltip text="namespace" term_id="namespace" >}} level when pods
@@ -57,39 +57,40 @@ PodSecurityPolicy API 已经被废弃,会在 Kubernetes v1.25 发行版中
5757
<!-- body -->
5858

5959
<!--
60-
## Enabling the `PodSecurity` admission plugin
60+
## {{% heading "prerequisites" %}}
6161
62-
In v1.23, the `PodSecurity` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
63-
is a Beta feature and is enabled by default.
62+
To use this mechanism, your cluster must enforce Pod Security admission.
6463
65-
In v1.22, the `PodSecurity` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
66-
is an Alpha feature and must be enabled in `kube-apiserver` in order to use the built-in admission plugin.
64+
### Built-in Pod Security admission enforcement
6765
-->
68-
## 启用 `PodSecurity` 准入插件 {#enabling-the-podsecurity-admission-plugin}
66+
## {{% heading "prerequisites" %}}
6967

70-
在 v1.23 中,`PodSecurity` [特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)
71-
是一项 Beta 功能特性,默认被启用。
68+
要使用此机制,你的集群必须强制执行 Pod 安全准入。
69+
70+
### 内置 Pod 安全准入强制执行
71+
72+
<!--
73+
In Kubernetes v{{< skew currentVersion >}}, the `PodSecurity` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
74+
is a beta feature and is enabled by default. You must have this feature gate enabled.
75+
If you are running a different version of Kubernetes, consult the documentation for that release.
76+
-->
77+
在 Kubernetes v{{< skew currentVersion >}} 中,`PodSecurity`
78+
[特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)是一项 Beta 特性,
79+
默认被启用。你必须启用此功能门控。如果你运行的是不同版本的 Kubernetes,请查阅该版本的文档。
7280

73-
在 v1.22 中,`PodSecurity` [特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)
74-
是一项 Alpha 功能特性,必须在 `kube-apiserver` 上启用才能使用内置的准入插件。
7581

76-
```shell
77-
--feature-gates="...,PodSecurity=true"
78-
```
7982

8083
<!--
81-
## Alternative: installing the `PodSecurity` admission webhook {#webhook}
84+
### Alternative: installing the `PodSecurity` admission webhook {#webhook}
8285
83-
For environments where the built-in `PodSecurity` admission plugin cannot be used,
84-
either because the cluster is older than v1.22, or the `PodSecurity` feature cannot be enabled,
85-
the `PodSecurity` admission logic is also available as a Beta [validating admission webhook](https://git.k8s.io/pod-security-admission/webhook).
86+
The `PodSecurity` admission logic is also available as a [validating admission webhook](https://git.k8s.io/pod-security-admission/webhook). This implementation is also beta.
87+
For environments where the built-in `PodSecurity` admission plugin cannot be enabled, you can instead enable that logic via a validating admission webhook.
8688
-->
87-
## 替代方案:安装 `PodSecurity` 准入 Webhook {#webhook}
89+
### 替代方案:安装 `PodSecurity` 准入 Webhook {#webhook}
8890

89-
对于无法应用内置 `PodSecurity` 准入插件的环境,无论是因为集群版本低于 v1.22,
90-
或者 `PodSecurity` 特性无法被启用,都可以使用 Beta 版本的
91-
[验证性准入 Webhook](https://git.k8s.io/pod-security-admission/webhook)
92-
来使用 `PodSecurity` 准入逻辑。
91+
`PodSecurity` 准入逻辑也可用作[验证性准入 Webhook](https://git.k8s.io/pod-security-admission/webhook)
92+
该实现也是 Beta 版本。
93+
对于无法启用内置 `PodSecurity` 准入插件的环境,你可以改为通过验证准入 Webhook 启用该逻辑。
9394

9495
<!--
9596
A pre-built container image, certificate generation scripts, and example manifests
@@ -116,6 +117,8 @@ regenerate the certificate or remove the webhook in favor of the built-in admiss
116117
需要重新生成证书或者去掉 Webhook 以使用内置的准入查件。
117118
{{< /note >}}
118119

120+
<!-- body -->
121+
119122
<!--
120123
## Pod Security levels
121124
-->

0 commit comments

Comments
 (0)