Skip to content

Commit a1ef2af

Browse files
authored
Merge pull request #31953 from sftim/20220227_update_pod_security_admission_concept_v1.24
Update Pod Security Admission concept for v1.24
2 parents 61095d4 + a5a94f0 commit a1ef2af

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

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

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The Kubernetes [Pod Security Standards](/docs/concepts/security/pod-security-sta
1919
different isolation levels for Pods. These standards let you define how you want to restrict the
2020
behavior of pods in a clear, consistent fashion.
2121

22-
As a Beta feature, Kubernetes offers a built-in _Pod Security_ {{< glossary_tooltip
22+
As a beta feature, Kubernetes offers a built-in _Pod Security_ {{< glossary_tooltip
2323
text="admission controller" term_id="admission-controller" >}}, the successor
2424
to [PodSecurityPolicies](/docs/concepts/security/pod-security-policy/). Pod security restrictions
2525
are applied at the {{< glossary_tooltip text="namespace" term_id="namespace" >}} level when pods
@@ -30,25 +30,21 @@ The PodSecurityPolicy API is deprecated and will be
3030
[removed](/docs/reference/using-api/deprecation-guide/#v1-25) from Kubernetes in v1.25.
3131
{{< /note >}}
3232

33-
<!-- body -->
3433

35-
## Enabling the `PodSecurity` admission plugin
34+
## {{% heading "prerequisites" %}}
3635

37-
In v1.23, the `PodSecurity` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
38-
is a Beta feature and is enabled by default.
36+
To use this mechanism, your cluster must enforce Pod Security admission.
3937

40-
In v1.22, the `PodSecurity` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
41-
is an Alpha feature and must be enabled in `kube-apiserver` in order to use the built-in admission plugin.
38+
### Built-in Pod Security admission enforcement
4239

43-
```shell
44-
--feature-gates="...,PodSecurity=true"
45-
```
40+
In Kubernetes v{{< skew currentVersion >}}, the `PodSecurity` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
41+
is a beta feature and is enabled by default. You must have this feature gate enabled.
42+
If you are running a different version of Kubernetes, consult the documentation for that release.
4643

47-
## Alternative: installing the `PodSecurity` admission webhook {#webhook}
44+
### Alternative: installing the `PodSecurity` admission webhook {#webhook}
4845

49-
For environments where the built-in `PodSecurity` admission plugin cannot be used,
50-
either because the cluster is older than v1.22, or the `PodSecurity` feature cannot be enabled,
51-
the `PodSecurity` admission logic is also available as a Beta [validating admission webhook](https://git.k8s.io/pod-security-admission/webhook).
46+
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.
47+
For environments where the built-in `PodSecurity` admission plugin cannot be enabled, you can instead enable that logic via a validating admission webhook.
5248

5349
A pre-built container image, certificate generation scripts, and example manifests
5450
are available at [https://git.k8s.io/pod-security-admission/webhook](https://git.k8s.io/pod-security-admission/webhook).
@@ -66,6 +62,8 @@ The generated certificate is valid for 2 years. Before it expires,
6662
regenerate the certificate or remove the webhook in favor of the built-in admission plugin.
6763
{{< /note >}}
6864

65+
<!-- body -->
66+
6967
## Pod Security levels
7068

7169
Pod Security admission places requirements on a Pod's [Security

0 commit comments

Comments
 (0)