You are defining a ClusterRole in Kubernetes to grant read access to secrets. However, you want to ensure this role only applies to a specific Namespace rather than the entire cluster. How should you bind this role to a ServiceAccount?

Direct Answer (Verified)Reviewed by Sunny (Senior Cloud Engineer)

Correct Answer: Use a RoleBinding within the specific Namespace

Binding a ClusterRole with a RoleBinding restricts its permissions to the namespace of the RoleBinding, preventing cluster-wide access....

Real Exam ScenarioKubernetes Security

You are defining a ClusterRole in Kubernetes to grant read access to secrets. However, you want to ensure this role only applies to a specific Namespace rather than the entire cluster. How should you bind this role to a ServiceAccount?

✓ Correct Answer & ExplanationKubernetes Security

Correct Answer

Use a RoleBinding within the specific Namespace

Why This Answer Is Correct

Binding a ClusterRole with a RoleBinding restricts its permissions to the namespace of the RoleBinding, preventing cluster-wide access.

📚 What This Question Tests

This question evaluates your knowledge of Kubernetes Security — a core concept tested in cloud certification exams. Understanding Kubernetes Security is essential for designing scalable, secure, and cost-effective cloud architectures. Mastery of this topic will help you answer scenario-based questions confidently on exam day.