DEV Community

Cheedge Lee
Cheedge Lee

Posted on • Originally published at notes-renovation.hashnode.dev

CKA Quick Check Points -- RBAC

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
Enter fullscreen mode Exit fullscreen mode

Role/Clusterrole

1. Yaml File

2. CMD

kubectl create [role|clusterrole] NAME --verb=verb --resource=resource.group/subresource [--resource-name=resourcename]
Enter fullscreen mode Exit fullscreen mode

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]
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

more verifications can check details.

Billboard image

Monitoring as code

With Checkly, you can use Playwright tests and Javascript to monitor end-to-end scenarios in your NextJS, Astro, Remix, or other application.

Get started now!

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay