Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IronCore864/c599a34c8556cbfd0c874a9cccf54947 to your computer and use it in GitHub Desktop.
Save IronCore864/c599a34c8556cbfd0c874a9cccf54947 to your computer and use it in GitHub Desktop.
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: eks:podsecuritypolicy:privileged
namespace: kube-system
labels:
kubernetes.io/cluster-service: "true"
eks.amazonaws.com/component: pod-security-policy
rules:
- apiGroups:
- policy
resourceNames:
- privileged
resources:
- podsecuritypolicies
verbs:
- use
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: eks:podsecuritypolicy:privileged
namespace: kube-system
annotations:
kubernetes.io/description: 'Allow service account aws-node to use awsnode psp in kube-system namespace.'
labels:
kubernetes.io/cluster-service: "true"
eks.amazonaws.com/component: pod-security-policy
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: eks:podsecuritypolicy:privileged
subjects:
- kind: ServiceAccount
name: aws-node
namespace: kube-system
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment