Restrict Access with RBAC
advanced
20 minInstructions
You’ve been asked to restrict permissions for a developer using a Kubernetes ServiceAccount dev-user
in the dev
namespace.
Objectives:
- Create the appropriate Role and RoleBinding.
- The user should only be allowed to
get
,list
, andwatch
pods. - Ensure no other resources (like deployments or secrets) can be accessed.
Verify using kubectl auth can-i
impersonation.