Skip to content

Instantly share code, notes, and snippets.

@shazadbrohi
Created November 2, 2020 23:20
Show Gist options
  • Save shazadbrohi/25b469a7e672027f95cc0b8b33f8574c to your computer and use it in GitHub Desktop.
Save shazadbrohi/25b469a7e672027f95cc0b8b33f8574c to your computer and use it in GitHub Desktop.
Grants all service accounts in a specific namespace permission to use the privileged pod security policy.
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: <name>-role-binding
namespace: <your-namespace>
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: privileged-cluster-role
subjects:
- apiGroup: rbac.authorization.k8s.io
kind: Group
name: system:serviceaccounts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment