Namespaces & RBAC — Concept Check
Questions on Namespaces & RBAC. Namespaces provide logical isolation within a cluster. RBAC (Role-Based Access Control) controls who can do what to which resources — the foundation of multi-team Kubernetes security.
Questions in this quiz
8 questions on Namespaces & RBAC — Concept Check. Work through them here, then start the quiz to answer them and see your score.
1.A team wants to deploy their application in a Kubernetes cluster without affecting other teams. What should they use?
- ACreate a new Namespace
- BCreate a new ClusterRole
- CDeploy in the default Namespace
- DUse kube-system Namespace
2.You have a RoleBinding that grants a Role to a user in the 'staging' Namespace. What happens if the user tries to access resources in the 'production' Namespace?
- AAccess will be denied
- BThe RoleBinding will automatically apply
- CAccess will be granted
- DIt depends on the ClusterRole
3.A developer claims that using a ClusterRole is necessary to manage pods in a Namespace. What's wrong with this statement?
- ARoles, not ClusterRoles, manage Namespace resources
- BClusterRoles are always required
- CRoles and ClusterRoles are identical
- DClusterRoles are for non-namespaced resources
4.A service account in 'production' needs to list pods. Which RBAC object is necessary?
- ARole with 'list' verb for pods
- BClusterRole with 'list' verb for nodes
- CRoleBinding with 'create' verb
- DServiceAccount with 'delete' verb
5.A team sets a ResourceQuota in a Namespace but notices no effect. What might be the issue?
- AResourceQuota is set in kube-system
- BResourceQuota is cluster-wide
- CResourceQuota not applied to existing resources
- DResourceQuota only limits CPU
6.A pod in 'staging' fails to access a service in 'production'. What could be the reason?
- ACross-namespace DNS is incorrect
- BPod's RoleBinding is missing
- CClusterRole is not used
- DServiceAccount permissions are wrong
7.A developer thinks every Namespace has its own kube-system. What's the reality?
- Akube-system is cluster-wide
- Bkube-system is for user apps
- Ckube-system is for public info
- DEach Namespace has kube-system
8.Which command sets the default Namespace for the current context?
- Akubectl get namespaces
- Bkubectl config set-context --current --namespace=production
- Ckubectl create namespace production
- Dkubectl apply -f namespace.yaml