Skip to content

Instantly share code, notes, and snippets.

@a-patel
Created October 10, 2021 12:00
Show Gist options
  • Save a-patel/1f1884099fea7a535847c6518a85c165 to your computer and use it in GitHub Desktop.
Save a-patel/1f1884099fea7a535847c6518a85c165 to your computer and use it in GitHub Desktop.
Kubernetes - RBAC - ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
# "namespace" omitted since ClusterRoles are not namespaced
name: secret-reader
rules:
- apiGroups: [""]
#
# at the HTTP level, the name of the resource for accessing Secret
# objects is "secrets"
resources: ["secrets"]
verbs: ["get", "watch", "list"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment