0
0
Kubernetesdevops~20 mins

Why RBAC matters in Kubernetes - Challenge Your Understanding

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
RBAC Mastery in Kubernetes
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
What is the primary purpose of RBAC in Kubernetes?

RBAC (Role-Based Access Control) is a key security feature in Kubernetes. What is its main purpose?

ATo manage network traffic between pods
BTo automatically scale pods based on CPU usage
CTo monitor cluster health and performance
DTo control who can perform specific actions on Kubernetes resources
Attempts:
2 left
💡 Hint

Think about security and permissions in Kubernetes.

💻 Command Output
intermediate
2:00remaining
What is the output of this RBAC role binding command?

Given the command below, what will be the result?

Kubernetes
kubectl create rolebinding read-pods --clusterrole=view --user=alice --namespace=default
ARole 'read-pods' created in namespace 'default'
BRoleBinding 'read-pods' created in namespace 'default'
CError: clusterrole 'view' does not exist
DError: user 'alice' not found
Attempts:
2 left
💡 Hint

Check the command syntax and resource types.

Troubleshoot
advanced
2:00remaining
Why might a user with a RoleBinding still get 'Forbidden' errors?

A user has a RoleBinding granting access to pods in namespace 'dev', but gets 'Forbidden' errors when listing pods. What could be the cause?

AThe pods are not running
BThe user is not authenticated to the cluster
CThe RoleBinding is in a different namespace than the pods
DThe RoleBinding uses a ClusterRole instead of a Role
Attempts:
2 left
💡 Hint

Consider namespace scope of RoleBindings and resources.

🔀 Workflow
advanced
3:00remaining
Order the steps to create RBAC permissions for a service account

Put these steps in the correct order to grant a service account read access to pods in the 'prod' namespace.

A2,1,3,4
B1,2,3,4
C2,3,1,4
D1,3,2,4
Attempts:
2 left
💡 Hint

Think about creating resources before binding and usage.

Best Practice
expert
2:30remaining
Which RBAC practice improves cluster security the most?

Choose the best RBAC practice to minimize security risks in a Kubernetes cluster.

AGrant users only the minimum permissions they need (principle of least privilege)
BGive all users cluster-admin role for simplicity
CUse RoleBindings only in the default namespace
DAvoid using RBAC and rely on network policies instead
Attempts:
2 left
💡 Hint

Think about limiting access to reduce damage from mistakes or attacks.