Difference between revisions of "Kind: Role"
Jump to navigation
Jump to search
(One intermediate revision by the same user not shown) | |||
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/ | ||
− | + | ||
− | 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 | |
− | + | name: pod-reader | |
− | rules: | + | rules: |
− | - apiGroups: [""] # "" indicates the core API group | + | - apiGroups: [""] # "" indicates the core API group |
− | + | resources: ["pods"] | |
− | + | verbs: ["list","get","watch"] | |
− | - apiGroups: ["extensions","apps"] | + | - apiGroups: ["extensions","apps"] |
− | + | resources: ["deployments"] | |
− | + | verbs: ["get", "list", "watch"] | |
− | EoF | + | EoF |
− | + | ||
+ | |||
+ | https://kubernetes.io/docs/reference/access-authn-authz/rbac/#role-example | ||
== Related == | == Related == |
Latest revision as of 11:18, 31 October 2023
kind: Role
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]
- Kubernetes roles,
kubectl get [ roles | clusterroles | clusterrolebindings ], kubectl create rolebinding
, K8s Cluster roles - Kubernetes RBAC
kubectl auth, kubectl auth can-i, kubectl auth reconcile
kubectl create [ role | clusterrole | clusterrolebinding
|rolebinding | serviceaccount ], groups:
, Kubernetes RBAC good practices,kube2iam
, K8s Cluster roles,rbac.authorization.k8s.io
,system:
Advertising: