@@ -19,15 +19,13 @@ You can configure this admission controller to set cluster-wide defaults and [ex
19
19
20
20
## Configure the Admission Controller
21
21
22
- {{< tabs name="PodSecurityConfiguration_example_1" >}}
23
- {{% tab name="pod-security.admission.config.k8s.io/v1beta1" %}}
24
22
``` yaml
25
23
apiVersion : apiserver.config.k8s.io/v1
26
24
kind : AdmissionConfiguration
27
25
plugins :
28
26
- name : PodSecurity
29
27
configuration :
30
- apiVersion : pod-security.admission.config.k8s.io/v1beta1
28
+ apiVersion : pod-security.admission.config.k8s.io/v1
31
29
kind : PodSecurityConfiguration
32
30
# Defaults applied when a mode label is not set.
33
31
#
@@ -56,43 +54,7 @@ plugins:
56
54
` ` `
57
55
58
56
{{< note >}}
59
- v1beta1 configuration requires v1.23+. For v1.22, use v1alpha1.
57
+ ` pod-security.admission.config.k8s.io/v1` configuration requires v1.25+.
58
+ For v1.23 and v1.24, use [v1beta1](https://v1-24.docs.kubernetes.io/docs/tasks/configure-pod-container/enforce-standards-admission-controller/).
59
+ For v1.22, use [v1alpha1](https://v1-22.docs.kubernetes.io/docs/tasks/configure-pod-container/enforce-standards-admission-controller/).
60
60
{{< /note >}}
61
-
62
- {{% /tab %}}
63
- {{% tab name="pod-security.admission.config.k8s.io/v1alpha1" %}}
64
- ` ` ` yaml
65
- apiVersion : apiserver.config.k8s.io/v1
66
- kind : AdmissionConfiguration
67
- plugins :
68
- - name : PodSecurity
69
- configuration :
70
- apiVersion : pod-security.admission.config.k8s.io/v1alpha1
71
- kind : PodSecurityConfiguration
72
- # Defaults applied when a mode label is not set.
73
- #
74
- # Level label values must be one of:
75
- # - "privileged" (default)
76
- # - "baseline"
77
- # - "restricted"
78
- #
79
- # Version label values must be one of:
80
- # - "latest" (default)
81
- # - specific version like "v{{< skew currentVersion >}}"
82
- defaults :
83
- enforce : " privileged"
84
- enforce-version : " latest"
85
- audit : " privileged"
86
- audit-version : " latest"
87
- warn : " privileged"
88
- warn-version : " latest"
89
- exemptions :
90
- # Array of authenticated usernames to exempt.
91
- usernames : []
92
- # Array of runtime class names to exempt.
93
- runtimeClasses : []
94
- # Array of namespaces to exempt.
95
- namespaces : []
96
- ` ` `
97
- {{% /tab %}}
98
- {{< /tabs >}}
0 commit comments