Skip to content

Commit bb85d62

Browse files
author
Tim Bannister
committed
Update docs for PodSecurityPolicy removal
1 parent 5f81602 commit bb85d62

File tree

4 files changed

+31
-29
lines changed

4 files changed

+31
-29
lines changed

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -131,4 +131,7 @@ current policy level:
131131
- [Enforcing Pod Security Standards](/docs/setup/best-practices/enforcing-pod-security-standards)
132132
- [Enforce Pod Security Standards by Configuring the Built-in Admission Controller](/docs/tasks/configure-pod-container/enforce-standards-admission-controller)
133133
- [Enforce Pod Security Standards with Namespace Labels](/docs/tasks/configure-pod-container/enforce-standards-namespace-labels)
134-
- [Migrate from PodSecurityPolicy to the Built-In PodSecurity Admission Controller](/docs/tasks/configure-pod-container/migrate-from-psp)
134+
135+
If you are running an older version of Kubernetes and want to upgrade
136+
to a version of Kubernetes that does not include PodSecurityPolicies,
137+
read [migrate from PodSecurityPolicy to the Built-In PodSecurity Admission Controller](/docs/tasks/configure-pod-container/migrate-from-psp).

content/en/docs/reference/access-authn-authz/admission-controllers.md

+7-15
Original file line numberDiff line numberDiff line change
@@ -663,23 +663,15 @@ admission plugin, which allows preventing pods from running on specifically tain
663663

664664
{{< feature-state for_k8s_version="v1.25" state="stable" >}}
665665

666-
This is the replacement for the deprecated [PodSecurityPolicy](#podsecuritypolicy) admission controller
667-
defined in the next section. This admission controller acts on creation and modification of the pod and
668-
determines if it should be admitted based on the requested security context and the
669-
[Pod Security Standards](/docs/concepts/security/pod-security-standards/).
666+
The PodSecurity admission controller checks new Pods before they are
667+
admitted, determines if it should be admitted based on the requested security context and the restrictions on permitted
668+
[Pod Security Standards](/docs/concepts/security/pod-security-standards/)
669+
for the namespace that the Pod would be in.
670670

671-
See the [Pod Security Admission documentation](/docs/concepts/security/pod-security-admission/)
672-
for more information.
673-
674-
### PodSecurityPolicy {#podsecuritypolicy}
675-
676-
{{< feature-state for_k8s_version="v1.21" state="deprecated" >}}
671+
See the [Pod Security Admission](/docs/concepts/security/pod-security-admission/)
672+
documentation for more information.
677673

678-
This admission controller acts on creation and modification of the pod and determines if it should be admitted
679-
based on the requested security context and the available Pod Security Policies.
680-
681-
See also the [PodSecurityPolicy](/docs/concepts/security/pod-security-policy/) documentation
682-
for more information.
674+
PodSecurity replaced an older admission controller named PodSecurityPolicy.
683675

684676
### PodTolerationRestriction {#podtolerationrestriction}
685677

content/en/docs/tasks/configure-pod-container/enforce-standards-admission-controller.md

+16-10
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,34 @@ reviewers:
44
- tallclair
55
- liggitt
66
content_type: task
7-
min-kubernetes-server-version: v1.22
87
---
98

10-
As of v1.22, Kubernetes provides a built-in [admission controller](/docs/reference/access-authn-authz/admission-controllers/#podsecurity)
9+
Kubernetes provides a built-in [admission controller](/docs/reference/access-authn-authz/admission-controllers/#podsecurity)
1110
to enforce the [Pod Security Standards](/docs/concepts/security/pod-security-standards).
1211
You can configure this admission controller to set cluster-wide defaults and [exemptions](/docs/concepts/security/pod-security-admission/#exemptions).
1312

1413
## {{% heading "prerequisites" %}}
1514

16-
{{% version-check %}}
15+
Following an alpha release in Kubernetes v1.22,
16+
Pod Security Admission becaome available by default in Kubernetes v1.23, as
17+
a beta. From version 1.25 onwards, Pod Security Admission is generally
18+
available. {{% version-check %}}
1719

18-
- Ensure the `PodSecurity` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/#feature-gates-for-alpha-or-beta-features) is enabled.
20+
If you are not running Kubernetes {{< skew currentVersion >}}, you can switch
21+
to viewing this page in the documentation for the Kubernetes version that you
22+
are running.
1923

2024
## Configure the Admission Controller
2125

26+
{{< note >}}
27+
`pod-security.admission.config.k8s.io/v1` configuration requires v1.25+.
28+
For v1.23 and v1.24, use [v1beta1](https://v1-24.docs.kubernetes.io/docs/tasks/configure-pod-container/enforce-standards-admission-controller/).
29+
For v1.22, use [v1alpha1](https://v1-22.docs.kubernetes.io/docs/tasks/configure-pod-container/enforce-standards-admission-controller/).
30+
{{< /note >}}
31+
32+
2233
```yaml
23-
apiVersion: apiserver.config.k8s.io/v1
34+
apiVersion: apiserver.config.k8s.io/v1 # see compatibility note
2435
kind: AdmissionConfiguration
2536
plugins:
2637
- name: PodSecurity
@@ -56,8 +67,3 @@ plugins:
5667
The above manifest needs to be specified via the `--admission-control-config-file` to kube-apiserver.
5768
{{< /note >}}
5869

59-
{{< note >}}
60-
`pod-security.admission.config.k8s.io/v1` configuration requires v1.25+.
61-
For v1.23 and v1.24, use [v1beta1](https://v1-24.docs.kubernetes.io/docs/tasks/configure-pod-container/enforce-standards-admission-controller/).
62-
For v1.22, use [v1alpha1](https://v1-22.docs.kubernetes.io/docs/tasks/configure-pod-container/enforce-standards-admission-controller/).
63-
{{< /note >}}

content/en/docs/tasks/configure-pod-container/enforce-standards-namespace-labels.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ reviewers:
44
- tallclair
55
- liggitt
66
content_type: task
7-
min-kubernetes-server-version: v1.22
87
---
98

109
Namespaces can be labeled to enforce the [Pod Security Standards](/docs/concepts/security/pod-security-standards). The three policies
@@ -15,9 +14,11 @@ text="admission controller" term_id="admission-controller" >}}.
1514

1615
## {{% heading "prerequisites" %}}
1716

18-
{{% version-check %}}
17+
Pod Security Admission was available by default in Kubernetes v1.23, as
18+
a beta. From version 1.25 onwards, Pod Security Admission is generally
19+
available.
1920

20-
- Ensure the `PodSecurity` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/#feature-gates-for-alpha-or-beta-features) is enabled.
21+
{{% version-check %}}
2122

2223
## Requiring the `baseline` Pod Security Standard with namespace labels
2324

0 commit comments

Comments
 (0)