This content originally appeared on DEV Community and was authored by Cheedge Lee
This is a quick recap for RBAC, more details can check the official doc or click the tiltle links.
ServiceAccount (sa)
1. Yaml File
2. CMD
kubectl create serviceaccount NAME -n NAMESPACE
Role/Clusterrole
1. Yaml File
2. CMD
kubectl create [role|clusterrole] NAME --verb=verb --resource=resource.group/subresource [--resource-name=resourcename]
Rolebinding/Clusterrolebinding
1. Yaml File
2. CMD
kubectl create rolebinding NAME --clusterrole=NAME|--role=NAME [--user=username] [--group=groupname]
[--serviceaccount=namespace:serviceaccountname]
kubectl create clusterrolebinding NAME --clusterrole=NAME [--user=username] [--group=groupname]
[--serviceaccount=namespace:serviceaccountname]
Usage & Quick Verify
1. Usage
Pod yaml file add spec.serviceAccountName
2. Quick Verify
kubectl auth can-i VERB RESOURCE --as=[USER|SA] -n NAMESPACE
more verifications can check details.
This content originally appeared on DEV Community and was authored by Cheedge Lee
Print
Share
Comment
Cite
Upload
Translate
Updates
There are no updates yet.
Click the Upload button above to add an update.

APA
MLA
Cheedge Lee | Sciencx (2025-01-10T22:46:46+00:00) CKA Quick Check Points — RBAC. Retrieved from https://www.scien.cx/2025/01/10/cka-quick-check-points-rbac/
" » CKA Quick Check Points — RBAC." Cheedge Lee | Sciencx - Friday January 10, 2025, https://www.scien.cx/2025/01/10/cka-quick-check-points-rbac/
HARVARDCheedge Lee | Sciencx Friday January 10, 2025 » CKA Quick Check Points — RBAC., viewed ,<https://www.scien.cx/2025/01/10/cka-quick-check-points-rbac/>
VANCOUVERCheedge Lee | Sciencx - » CKA Quick Check Points — RBAC. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/01/10/cka-quick-check-points-rbac/
CHICAGO" » CKA Quick Check Points — RBAC." Cheedge Lee | Sciencx - Accessed . https://www.scien.cx/2025/01/10/cka-quick-check-points-rbac/
IEEE" » CKA Quick Check Points — RBAC." Cheedge Lee | Sciencx [Online]. Available: https://www.scien.cx/2025/01/10/cka-quick-check-points-rbac/. [Accessed: ]
rf:citation » CKA Quick Check Points — RBAC | Cheedge Lee | Sciencx | https://www.scien.cx/2025/01/10/cka-quick-check-points-rbac/ |
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.