Hello, i have a problem when enforcing pod securit...
# general
b
Hello, i have a problem when enforcing pod security policy: After setting the “restricted” policy in an RKE cluster as the default policy for the project, I’m still able to create a new deployment with a pod in which the container runs as root user: What am i missing ? # deployment.yml
Copy code
apiVersion: apps/v1
kind: Deployment
metadata:
  name: test-app
  namespace: prd
spec:
  replicas: 1
  selector:
    matchLabels:
      app: test-app
  template:
    metadata:
      labels:
        app: test-app
    spec:
      containers:
      - image: nginx
        name: test-app
        securityContext:
          allowPrivilegeEscalation: false
          runAsUser: 0
# Cluster policy (screen-shot) # Project Pod security (screen-shot) # Container shell (screen-shot)