Skip to content

Instantly share code, notes, and snippets.

@sumanthkumarc
Created January 8, 2022 17:11
Show Gist options
  • Save sumanthkumarc/d6d9b89446ff01947177e17e41d08c73 to your computer and use it in GitHub Desktop.
Save sumanthkumarc/d6d9b89446ff01947177e17e41d08c73 to your computer and use it in GitHub Desktop.
~ kubectl get clusterrole view -o yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
annotations:
rbac.authorization.kubernetes.io/autoupdate: "true"
labels:
kubernetes.io/bootstrapping: rbac-defaults
rbac.authorization.k8s.io/aggregate-to-edit: "true"
name: view
aggregationRule:
clusterRoleSelectors:
- matchLabels:
rbac.authorization.k8s.io/aggregate-to-view: "true"
rules:
- apiGroups:
- ""
resources:
- configmaps
- endpoints
- persistentvolumeclaims
- pods
- replicationcontrollers
- replicationcontrollers/scale
- serviceaccounts
- services
verbs:
- get
- list
- watch
---
# We can find our rules aggregated with others in the main View ClusterRole
- apiGroups:
- autoscaling
resources:
- horizontalpodautoscalers
verbs:
- update
- create
- patch
- apiGroups:
- ""
resources:
- pods
- pods/log
- pods/attach
- pods/exec
- pods/portforward
- pods/proxy
verbs:
- '*'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment