You will learn:
- Introduction to
RBAC
Role
ServiceAccount
RoleBinding
andClusterRoleBinding
- List all Roles
- List all ServiceAccounts
- List all RoleBindings
- List all ClusterRoleBindings
- In-Cluster
kubectl
:kubectl run --rm -i --tty --restart=Never kubectl --image=bitnami/kubectl -- get pods
kubectl run --rm -i --tty --restart=Never kubectl --image=bitnami/kubectl --command -- bash
- Create a
Developer
role, indefault
namespace, with permissions:- Read Pods in
default
namespace
- Read Pods in
- Create a
Developer
service account indefault
namespace - Create
Developer
role binding indefault
namespace - Create
kubectl
pod that uses this service account:- Run
kubectl get pods
(This should work) - Run
kubectl get pods -n kube-system
(This should fail)
- Run