The tables below enumerate the configuration parameters on
PodSecurityPolicy objects, whether the field mutates
and/or validates pods, and how the configuration values map to the
Pod Security Standards.
For each applicable parameter, the allowed values for the Baseline and Restricted profiles are listed. Anything outside the allowed values for those profiles would fall under the Privileged profile. "No opinion" means all values are allowed under all Pod Security Standards.
For a step-by-step migration guide, see Migrate from PodSecurityPolicy to the Built-In PodSecurity Admission Controller.
The fields enumerated in this table are part of the PodSecurityPolicySpec, which is specified
under the .spec field path.
PodSecurityPolicySpecprivilegedfalse / undefined / nildefaultAddCapabilitiesallowedCapabilities below.allowedCapabilitiesBaseline: subset of
AUDIT_WRITECHOWNDAC_OVERRIDEFOWNERFSETIDKILLMKNODNET_BIND_SERVICESETFCAPSETGIDSETPCAPSETUIDSYS_CHROOTRestricted: empty / undefined / nil OR a list containing only NET_BIND_SERVICE
requiredDropCapabilitiesBaseline: no opinion
Restricted: must include ALL
volumesBaseline: anything except
hostPath*Restricted: subset of
configMapcsidownwardAPIemptyDirephemeralpersistentVolumeClaimprojectedsecrethostNetworkfalse / undefined / nilhostPortshostPIDfalse / undefined / nilhostIPCfalse / undefined / nilseLinuxBaseline & Restricted:
seLinux.rule is MustRunAs, with the following options
user is unset ("" / undefined / nil)role is unset ("" / undefined / nil)type is unset or one of: container_t, container_init_t, container_kvm_t, container_engine_tlevel is anythingrunAsUserBaseline: Anything
Restricted: rule is MustRunAsNonRoot
runAsGroupsupplementalGroupsfsGroupreadOnlyRootFilesystemdefaultAllowPrivilegeEscalationallowPrivilegeEscalationOnly mutating if set to false
Baseline: No opinion
Restricted: false
allowedHostPathsallowedFlexVolumesallowedCSIDriversallowedUnsafeSysctlsforbiddenSysctlsallowedProcMountTypes["Default"] OR undefined / nil / emptyruntimeClass .defaultRuntimeClassNameruntimeClass .allowedRuntimeClassNamesThe annotations enumerated in this
table can be specified under .metadata.annotations on the PodSecurityPolicy object.
PSP Annotation | Type | Pod Security Standards Equivalent |
|---|---|---|
seccomp.security.alpha.kubernetes.io/defaultProfileName | Mutating | No opinion |
seccomp.security.alpha.kubernetes.io/allowedProfileNames | Validating | Baseline: Restricted:
|
apparmor.security.beta.kubernetes.io/defaultProfileName | Mutating | No opinion |
apparmor.security.beta.kubernetes.io/allowedProfileNames | Validating | Baseline: Restricted:
|