diff --git a/content/zh/docs/concepts/security/pod-security-admission.md b/content/zh/docs/concepts/security/pod-security-admission.md index 87fddd9ddb..54ae5436a0 100644 --- a/content/zh/docs/concepts/security/pod-security-admission.md +++ b/content/zh/docs/concepts/security/pod-security-admission.md @@ -33,7 +33,7 @@ Kubernetes [Pod 安全性标准(Security Standards)](/zh/docs/concepts/secur 为 Pod 定义不同的隔离级别。这些标准能够让你以一种清晰、一致的方式定义如何限制 Pod 行为。 -## 启用 `PodSecurity` 准入插件 {#enabling-the-podsecurity-admission-plugin} +## {{% heading "prerequisites" %}} -在 v1.23 中,`PodSecurity` [特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/) -是一项 Beta 功能特性,默认被启用。 +要使用此机制,你的集群必须强制执行 Pod 安全准入。 -在 v1.22 中,`PodSecurity` [特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/) -是一项 Alpha 功能特性,必须在 `kube-apiserver` 上启用才能使用内置的准入插件。 - -```shell ---feature-gates="...,PodSecurity=true" -``` +### 内置 Pod 安全准入强制执行 -## 替代方案:安装 `PodSecurity` 准入 Webhook {#webhook} +在 Kubernetes v{{< skew currentVersion >}} 中,`PodSecurity` +[特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)是一项 Beta 特性, +默认被启用。你必须启用此功能门控。如果你运行的是不同版本的 Kubernetes,请查阅该版本的文档。 -对于无法应用内置 `PodSecurity` 准入插件的环境,无论是因为集群版本低于 v1.22, -或者 `PodSecurity` 特性无法被启用,都可以使用 Beta 版本的 -[验证性准入 Webhook](https://git.k8s.io/pod-security-admission/webhook)。 -来使用 `PodSecurity` 准入逻辑。 + + + +### 替代方案:安装 `PodSecurity` 准入 Webhook {#webhook} + +`PodSecurity` 准入逻辑也可用作[验证性准入 Webhook](https://git.k8s.io/pod-security-admission/webhook)。 +该实现也是 Beta 版本。 +对于无法启用内置 `PodSecurity` 准入插件的环境,你可以改为通过验证准入 Webhook 启用该逻辑。 +