Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :~$ k -n monitoring get rolebinding monitoring-viewers -o yaml
- apiVersion: authorization.openshift.io/v1
- groupNames:
- - monitoring-viewers
- kind: RoleBinding
- metadata:
- name: monitoring-viewers
- namespace: monitoring
- roleRef:
- name: view
- subjects:
- - kind: Group
- name: monitoring-viewers
- - kind: ServiceAccount
- name: prom
- namespace: monitoring
- userNames:
- - system:serviceaccount:monitoring:prom
- :~$ k -n monitoring get clusterrole view -o yaml
- aggregationRule:
- clusterRoleSelectors:
- - matchLabels:
- rbac.authorization.k8s.io/aggregate-to-view: "true"
- apiVersion: authorization.openshift.io/v1
- kind: ClusterRole
- metadata:
- annotations:
- openshift.io/description: A user who can view but not edit any resources within
- the project. They can not view secrets or membership.
- openshift.io/reconcile-protect: "false"
- labels:
- kubernetes.io/bootstrapping: rbac-defaults
- name: view
- rules:
- - apiGroups:
- - ""
- attributeRestrictions: null
- resources:
- - configmaps
- - endpoints
- - persistentvolumeclaims
- - pods
- - replicationcontrollers
- - replicationcontrollers/scale
- - serviceaccounts
- - services
- verbs:
- - get
- - list
- - watch
- - apiGroups:
- - ""
- attributeRestrictions: null
- resources:
- - bindings
- - events
- - limitranges
- - namespaces/status
- - pods/log
- - pods/status
- - replicationcontrollers/status
- - resourcequotas
- - resourcequotas/status
- verbs:
- - get
- - list
- - watch
- - apiGroups:
- - ""
- attributeRestrictions: null
- resources:
- - namespaces
- verbs:
- - get
- - list
- - watch
- - apiGroups:
- - apps
- attributeRestrictions: null
- resources:
- - daemonsets
- - deployments
- - deployments/scale
- - replicasets
- - replicasets/scale
- - statefulsets
- - statefulsets/scale
- verbs:
- - get
- - list
- - watch
- - apiGroups:
- - autoscaling
- attributeRestrictions: null
- resources:
- - horizontalpodautoscalers
- verbs:
- - get
- - list
- - watch
- - apiGroups:
- - batch
- attributeRestrictions: null
- resources:
- - cronjobs
- - jobs
- verbs:
- - get
- - list
- - watch
- - apiGroups:
- - extensions
- attributeRestrictions: null
- resources:
- - daemonsets
- - deployments
- - deployments/scale
- - ingresses
- - networkpolicies
- - replicasets
- - replicasets/scale
- - replicationcontrollers/scale
- verbs:
- - get
- - list
- - watch
- - apiGroups:
- - policy
- attributeRestrictions: null
- resources:
- - poddisruptionbudgets
- verbs:
- - get
- - list
- - watch
- - apiGroups:
- - networking.k8s.io
- attributeRestrictions: null
- resources:
- - networkpolicies
- verbs:
- - get
- - list
- - watch
- - apiGroups:
- - ""
- - build.openshift.io
- attributeRestrictions: null
- resources:
- - buildconfigs
- - buildconfigs/webhooks
- - builds
- verbs:
- - get
- - list
- - watch
- - apiGroups:
- - ""
- - build.openshift.io
- attributeRestrictions: null
- resources:
- - builds/log
- verbs:
- - get
- - list
- - watch
- - apiGroups:
- - build.openshift.io
- attributeRestrictions: null
- resources:
- - jenkins
- verbs:
- - view
- - apiGroups:
- - ""
- - apps.openshift.io
- attributeRestrictions: null
- resources:
- - deploymentconfigs
- - deploymentconfigs/scale
- verbs:
- - get
- - list
- - watch
- - apiGroups:
- - ""
- - apps.openshift.io
- attributeRestrictions: null
- resources:
- - deploymentconfigs/log
- - deploymentconfigs/status
- verbs:
- - get
- - list
- - watch
- - apiGroups:
- - ""
- - image.openshift.io
- attributeRestrictions: null
- resources:
- - imagestreamimages
- - imagestreammappings
- - imagestreams
- - imagestreamtags
- verbs:
- - get
- - list
- - watch
- - apiGroups:
- - ""
- - image.openshift.io
- attributeRestrictions: null
- resources:
- - imagestreams/status
- verbs:
- - get
- - list
- - watch
- - apiGroups:
- - ""
- - project.openshift.io
- attributeRestrictions: null
- resources:
- - projects
- verbs:
- - get
- - apiGroups:
- - ""
- - quota.openshift.io
- attributeRestrictions: null
- resources:
- - appliedclusterresourcequotas
- verbs:
- - get
- - list
- - watch
- - apiGroups:
- - ""
- - route.openshift.io
- attributeRestrictions: null
- resources:
- - routes
- verbs:
- - get
- - list
- - watch
- - apiGroups:
- - ""
- - route.openshift.io
- attributeRestrictions: null
- resources:
- - routes/status
- verbs:
- - get
- - list
- - watch
- - apiGroups:
- - ""
- - template.openshift.io
- attributeRestrictions: null
- resources:
- - processedtemplates
- - templateconfigs
- - templateinstances
- - templates
- verbs:
- - get
- - list
- - watch
- - apiGroups:
- - ""
- - build.openshift.io
- attributeRestrictions: null
- resources:
- - buildlogs
- verbs:
- - get
- - list
- - watch
- - apiGroups:
- - ""
- attributeRestrictions: null
- resources:
- - resourcequotausages
- verbs:
- - get
- - list
- - watch
- - apiGroups:
- - servicecatalog.k8s.io
- attributeRestrictions: null
- resources:
- - servicebindings
- - serviceinstances
- verbs:
- - get
- - list
- - watch
- - apiGroups:
- - servicecatalog.k8s.io
- attributeRestrictions: null
- resources:
- - servicebrokers
- verbs:
- - get
- - apiGroups:
- - servicecatalog.k8s.io
- attributeRestrictions: null
- resources:
- - servicebrokers
- verbs:
- - list
- - apiGroups:
- - servicecatalog.k8s.io
- attributeRestrictions: null
- resources:
- - servicebrokers
- verbs:
- - watch
- - apiGroups:
- - servicecatalog.k8s.io
- attributeRestrictions: null
- resources:
- - serviceclasses
- verbs:
- - get
- - apiGroups:
- - servicecatalog.k8s.io
- attributeRestrictions: null
- resources:
- - serviceclasses
- verbs:
- - list
- - apiGroups:
- - servicecatalog.k8s.io
- attributeRestrictions: null
- resources:
- - serviceclasses
- verbs:
- - watch
- - apiGroups:
- - servicecatalog.k8s.io
- attributeRestrictions: null
- resources:
- - serviceplans
- verbs:
- - get
- - apiGroups:
- - servicecatalog.k8s.io
- attributeRestrictions: null
- resources:
- - serviceplans
- verbs:
- - list
- - apiGroups:
- - servicecatalog.k8s.io
- attributeRestrictions: null
- resources:
- - serviceplans
- verbs:
- - watch
- :~$ k --as=system:serviceaccount:monitoring:prom get ns
- Error from server (Forbidden): namespaces is forbidden: User "system:serviceaccount:monitoring:prom" cannot list namespaces at the cluster scope: no RBAC policy matched
Advertisement
Add Comment
Please, Sign In to add comment