From ce898c50be7acd45a33521d762a5e58f9fb2e63b Mon Sep 17 00:00:00 2001 From: Tim Allclair Date: Mon, 1 Aug 2022 16:49:09 -0700 Subject: [PATCH 1/2] Update Pod Security Admission docs for graduation to stable --- .../security/pod-security-admission.md | 39 +++---------------- 1 file changed, 5 insertions(+), 34 deletions(-) diff --git a/content/en/docs/concepts/security/pod-security-admission.md b/content/en/docs/concepts/security/pod-security-admission.md index 60f87c04d9e09..fb4d8de0c2330 100644 --- a/content/en/docs/concepts/security/pod-security-admission.md +++ b/content/en/docs/concepts/security/pod-security-admission.md @@ -13,23 +13,16 @@ min-kubernetes-server-version: v1.22 -{{< feature-state for_k8s_version="v1.23" state="beta" >}} +{{< feature-state for_k8s_version="v1.25" state="stable" >}} The Kubernetes [Pod Security Standards](/docs/concepts/security/pod-security-standards/) define different isolation levels for Pods. These standards let you define how you want to restrict the behavior of pods in a clear, consistent fashion. -As a beta feature, Kubernetes offers a built-in _Pod Security_ {{< glossary_tooltip -text="admission controller" term_id="admission-controller" >}}, the successor -to [PodSecurityPolicies](/docs/concepts/security/pod-security-policy/). Pod security restrictions -are applied at the {{< glossary_tooltip text="namespace" term_id="namespace" >}} level when pods -are created. - -{{< note >}} -The PodSecurityPolicy API is deprecated and will be -[removed](/docs/reference/using-api/deprecation-guide/#v1-25) from Kubernetes in v1.25. -{{< /note >}} - +Kubernetes offers a built-in _Pod Security_ {{< glossary_tooltip text="admission controller" +term_id="admission-controller" >}} to enforce the Pod Security Standards. Pod security restrictions +are applied at the {{< glossary_tooltip text="namespace" term_id="namespace" >}} level when pods are +created. ## {{% heading "prerequisites" %}} @@ -37,31 +30,9 @@ To use this mechanism, your cluster must enforce Pod Security admission. ### Built-in Pod Security admission enforcement -From Kubernetes v1.23, the `PodSecurity` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) is a beta feature and is enabled by default. This page is part of the documentation for Kubernetes v{{< skew currentVersion >}}. If you are running a different version of Kubernetes, consult the documentation for that release. -### Alternative: installing the `PodSecurity` admission webhook {#webhook} - -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. -For environments where the built-in `PodSecurity` admission plugin cannot be enabled, you can instead enable that logic via a validating admission webhook. - -A pre-built container image, certificate generation scripts, and example manifests -are available at [https://git.k8s.io/pod-security-admission/webhook](https://git.k8s.io/pod-security-admission/webhook). - -To install: -```shell -git clone https://github.com/kubernetes/pod-security-admission.git -cd pod-security-admission/webhook -make certs -kubectl apply -k . -``` - -{{< note >}} -The generated certificate is valid for 2 years. Before it expires, -regenerate the certificate or remove the webhook in favor of the built-in admission plugin. -{{< /note >}} - ## Pod Security levels From 29d9fa5a5f6cfac4364d59df83dd6d044675bff0 Mon Sep 17 00:00:00 2001 From: Tim Allclair Date: Fri, 5 Aug 2022 14:39:39 -0700 Subject: [PATCH 2/2] Remove prerequisites --- content/en/docs/concepts/security/pod-security-admission.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/content/en/docs/concepts/security/pod-security-admission.md b/content/en/docs/concepts/security/pod-security-admission.md index fb4d8de0c2330..57e4fd98003b5 100644 --- a/content/en/docs/concepts/security/pod-security-admission.md +++ b/content/en/docs/concepts/security/pod-security-admission.md @@ -8,7 +8,6 @@ description: > Standards. content_type: concept weight: 20 -min-kubernetes-server-version: v1.22 --- @@ -24,10 +23,6 @@ term_id="admission-controller" >}} to enforce the Pod Security Standards. Pod se are applied at the {{< glossary_tooltip text="namespace" term_id="namespace" >}} level when pods are created. -## {{% heading "prerequisites" %}} - -To use this mechanism, your cluster must enforce Pod Security admission. - ### Built-in Pod Security admission enforcement This page is part of the documentation for Kubernetes v{{< skew currentVersion >}}.