Created
October 28, 2021 17:29
-
-
Save a-patel/a263d10a607de6b3b073295d0bd1556b to your computer and use it in GitHub Desktop.
Kubernetes - RBAC - RoleBinding - ClusterRole
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: rbac.authorization.k8s.io/v1 | |
# This role binding allows "dave" to read secrets in the "development" namespace. | |
# You need to already have a ClusterRole named "secret-reader". | |
kind: RoleBinding | |
metadata: | |
name: read-secrets | |
# | |
# The namespace of the RoleBinding determines where the permissions are granted. | |
# This only grants permissions within the "development" namespace. | |
namespace: development | |
subjects: | |
- kind: User | |
name: dave # Name is case sensitive | |
apiGroup: rbac.authorization.k8s.io | |
roleRef: | |
kind: ClusterRole | |
name: secret-reader | |
apiGroup: rbac.authorization.k8s.io |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment