apiVersion: policy/v1beta1 kind: PodSecurityPolicy metadata: name: baseline annotations: # Optional: Allow the default AppArmor profile, requires setting the default. apparmor.security.beta.kubernetes.io/allowedProfileNames: 'runtime/default' apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default' # Optional: Allow the default seccomp profile, requires setting the default. seccomp.security.alpha.kubernetes.io/allowedProfileNames: 'docker/default,runtime/default,unconfined' seccomp.security.alpha.kubernetes.io/defaultProfileName: 'unconfined' spec: privileged: false # The moby default capability set, defined here: # https://github.com/moby/moby/blob/0a5cec2833f82a6ad797d70acbf9cbbaf8956017/oci/caps/defaults.go#L6-L19 allowedCapabilities: - 'CHOWN' - 'DAC_OVERRIDE' - 'FSETID' - 'FOWNER' - 'MKNOD' - 'NET_RAW' - 'SETGID' - 'SETUID' - 'SETFCAP' - 'SETPCAP' - 'NET_BIND_SERVICE' - 'SYS_CHROOT' - 'KILL' - 'AUDIT_WRITE' # Allow all volume types except hostpath volumes: # 'core' volume types - 'configMap' - 'emptyDir' - 'projected' - 'secret' - 'downwardAPI' # Assume that persistentVolumes set up by the cluster admin are safe to use. - 'persistentVolumeClaim' # Allow all other non-hostpath volume types. - 'awsElasticBlockStore' - 'azureDisk' - 'azureFile' - 'cephFS' - 'cinder' - 'csi' - 'fc' - 'flexVolume' - 'flocker' - 'gcePersistentDisk' - 'gitRepo' - 'glusterfs' - 'iscsi' - 'nfs' - 'photonPersistentDisk' - 'portworxVolume' - 'quobyte' - 'rbd' - 'scaleIO' - 'storageos' - 'vsphereVolume' hostNetwork: false hostIPC: false hostPID: false readOnlyRootFilesystem: false runAsUser: rule: 'RunAsAny' seLinux: rule: 'RunAsAny' supplementalGroups: rule: 'RunAsAny' fsGroup: rule: 'RunAsAny'