Restricted — heavily restricted Pod security standard.
1apiVersion: v12kind: Namespace3metadata:4 name: production5 labels:6 pod-security.kubernetes.io/enforce: restricted7 pod-security.kubernetes.io/enforce-version: latest8---9apiVersion: v110kind: Pod11metadata:12 name: restricted-pod13 namespace: production14spec:15 securityContext:16 runAsNonRoot: true17 seccompProfile:18 type: RuntimeDefault19 containers:20 - name: app21 image: nginx:latest22 securityContext:23 allowPrivilegeEscalation: false24 capabilities:25 drop:26 - ALL27 volumeMounts:28 - name: tmp29 mountPath: /tmp30 volumes:31 - name: tmp32 emptyDir: {}
1kubectl apply -f pod.yaml 2>&12kubectl get pod restricted-pod -o jsonpath='{.status.qosClass}'
Required: runAsNonRoot, drop ALL capabilities, seccomp RuntimeDefault.