Skip to content

Instantly share code, notes, and snippets.

@quangthe
Created May 11, 2022 02:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save quangthe/34a37e9187474f9b2a2bfe693d033ac7 to your computer and use it in GitHub Desktop.
Save quangthe/34a37e9187474f9b2a2bfe693d033ac7 to your computer and use it in GitHub Desktop.
AWS EKS auth readonly group
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: eks-demo-readonly-clusterrole
rules:
- apiGroups:
- ""
resources:
- nodes
- namespaces
- pods
- services
- replicationcontrollers
verbs:
- get
- list
- apiGroups:
- apps
resources:
- deployments
- daemonsets
- statefulsets
- replicasets
verbs:
- get
- list
- apiGroups:
- batch
resources:
- jobs
- cronjobs
verbs:
- get
- list
- apiGroups:
- autoscaling
resources:
- horizontalpodautoscalers
verbs:
- get
- list
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: eks-demo-readonly-clusterrole-binding
subjects:
- kind: Group
name: eks-demo-readonly-group
apiGroup: rbac.authorization.k8s.io
roleRef:
kind: ClusterRole
name: eks-demo-readonly-clusterrole
apiGroup: rbac.authorization.k8s.io
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment