Difference between revisions of "Kind: Role"

From wikieduonline
Jump to navigation Jump to search
(Created page with " * {{Kind}}")
 
 
(16 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
{{lc}}
 +
* <code>[[kind:]] Role</code>
  
 +
* https://archive.eksworkshop.com/beginner/090_rbac/create_role_and_binding/
  
 +
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
  
  
* {{Kind}}
+
https://kubernetes.io/docs/reference/access-authn-authz/rbac/#role-example
 +
 
 +
== Related ==
 +
* <code>[[kind: ClusterRole]]</code>
 +
* <code>[[kind: RoleBinding]]</code>
 +
* <code>[[kind: ClusterRoleBinding]]</code>
 +
 
 +
== See also ==
 +
* {{Kubernetes roles}}
 +
* {{K8s RBAC}}
 +
 
 +
[[Category:K8s]]

Latest revision as of 11:18, 31 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


https://kubernetes.io/docs/reference/access-authn-authz/rbac/#role-example

Related[edit]

See also[edit]

Advertising: