From f847a8107207bd994d304921cbee0132fff637ad Mon Sep 17 00:00:00 2001 From: zyy19981018 Date: Wed, 4 May 2022 21:07:41 +0800 Subject: [PATCH] [zh]Update content/zh/docs/concepts/scheduling-eviction/assign-pod-node.md [zh]Update content/zh/docs/concepts/security/pod-security-admission.md [zh]update content/zh/docs/concepts/security/pod-security-admission.md [zh]Update content/zh/docs/concepts/security/pod-security-admission.md [zh]Update content/zh/docs/concepts/security/pod-security-admission.md --- .../scheduling-eviction/assign-pod-node.md | 12 +---- .../security/pod-security-admission.md | 53 ++++++++++--------- 2 files changed, 29 insertions(+), 36 deletions(-) diff --git a/content/zh/docs/concepts/scheduling-eviction/assign-pod-node.md b/content/zh/docs/concepts/scheduling-eviction/assign-pod-node.md index 9cac596ae7..a210302498 100644 --- a/content/zh/docs/concepts/scheduling-eviction/assign-pod-node.md +++ b/content/zh/docs/concepts/scheduling-eviction/assign-pod-node.md @@ -605,7 +605,7 @@ affinity/anti-affinity definition appears. --> #### 名字空间选择算符 {#namespace-selector} -{{< feature-state for_k8s_version="v1.22" state="beta" >}} +{{< feature-state for_k8s_version="v1.24" state="stable" >}} -此功能特性是 Beta 版本的,默认是被启用的。你可以通过针对 kube-apiserver 和 -kube-scheduler 设置[特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/) -`PodAffinityNamespaceSelector` 来禁用此特性。 -{{< /note >}} -## 启用 `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 启用该逻辑。 +