1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
| apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: cluster-dev-readonly roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: dev-readonly subjects: - apiGroup: rbac.authorization.k8s.io kind: User name: dev
--- apiVersion: rbac.authorization.k8s.io/v1beta1 kind: ClusterRole metadata: name: dev-readonly rules: - apiGroups: ["metrics.k8s.io"] resources: ["pods", "nodes"] verbs: ["get", "watch", "list"]
- apiGroups: [""] resources: ["nodes"] verbs: ["get", "watch", "list"]
- apiGroups: [""] resources: ["pods", "pods/exec"] verbs: ["create", "get", "list", "watch"]
- apiGroups: [""] resources: ["pods"] verbs: ["delete"]
- apiGroups: [""] resources: ["configmaps"] verbs: ["get", "list", "watch"]
- apiGroups: [""] resources: ["endpoints", "services"] verbs: ["get", "watch", "list"]
- apiGroups: [""] resources: [ "resourcequotas/status", "resourcequotas", "bindings", "events", "limitranges", "namespaces/status", "pods/log", "pods/status", "replicationcontrollers/status", ] verbs: ["get", "watch", "list"]
- apiGroups: [""] resources: ["namespaces"] verbs: ["get", "watch", "list"]
- apiGroups: ["apps"] resources: [ "deployments", "deployments/rollback", "deployments/scale", "deployments/rollout", "statefulsets", ] verbs: ["get", "watch", "list","patch"]
- apiGroups: ["autoscaling"] resources: ["horizontalpodautoscalers"] verbs: ["get", "watch", "list"] - apiGroups: ["batch"] resources: ["cronjobs", "jobs", "scheduledjobs"] verbs: ["get", "watch", "list"]
- apiGroups: ["extensions"] resources: ["daemonsets", "deployments", "ingresses", "replicasets"] verbs: ["get", "watch", "list"]
|