Created
October 19, 2018 16:02
-
-
Save dwdraju/60fdffecae03440313922d0eaba56f9d to your computer and use it in GitHub Desktop.
Kubernetes RBAC for Log Viewer
This file contains 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
kind: Role | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
metadata: | |
name: user-log-reader | |
namespace: default | |
rules: | |
- apiGroups: | |
- "" | |
resources: | |
- pods | |
- pods/log | |
verbs: ["get", "list"] | |
--- | |
kind: RoleBinding | |
apiVersion: rbac.authorization.k8s.io/v1 | |
metadata: | |
name: user-log-reader | |
namespace: default | |
subjects: | |
- kind: User | |
name: user@google-account.com | |
apiGroup: rbac.authorization.k8s.io | |
roleRef: | |
kind: Role | |
name: user-log-reader | |
apiGroup: rbac.authorization.k8s.io |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks you, it worked when change
rbac.authorization.k8s.io/v1beta1
torbac.authorization.k8s.io/v1
on gke.