Difference between revisions of "Kind: Role"

From wikieduonline
Jump to navigation Jump to search
Line 3: Line 3:
  
 
* https://archive.eksworkshop.com/beginner/090_rbac/create_role_and_binding/
 
* https://archive.eksworkshop.com/beginner/090_rbac/create_role_and_binding/
<pre>
+
 
cat << EoF > rbacuser-role.yaml
+
cat << EoF > rbacuser-role.yaml
kind: Role
+
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
+
apiVersion: [[rbac.authorization.k8s.io/v1]]
metadata:
+
metadata:
  namespace: rbac-test
+
  namespace: rbac-test
  name: pod-reader
+
  name: pod-reader
rules:
+
rules:
- apiGroups: [""] # "" indicates the core API group
+
- apiGroups: [""] # "" indicates the core API group
  resources: ["pods"]
+
  resources: ["pods"]
  verbs: ["list","get","watch"]
+
  verbs: ["list","get","watch"]
- apiGroups: ["extensions","apps"]
+
- apiGroups: ["extensions","apps"]
  resources: ["deployments"]
+
  resources: ["deployments"]
  verbs: ["get", "list", "watch"]
+
  verbs: ["get", "list", "watch"]
EoF
+
EoF
</pre>
 
  
 
== Related ==
 
== Related ==

Revision as of 12:42, 4 October 2023

cat << EoF > rbacuser-role.yaml
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  namespace: rbac-test
  name: pod-reader
rules:
- apiGroups: [""] # "" indicates the core API group
  resources: ["pods"]
  verbs: ["list","get","watch"]
- apiGroups: ["extensions","apps"]
  resources: ["deployments"]
  verbs: ["get", "list", "watch"]
EoF

Related

See also

Advertising: