Prepare for the Red Hat Openshift Developer EX288 Exam. Study with comprehensive quizzes and flashcards. Each question includes hints and explanations to enhance your understanding. Ace your exam with confidence!

Multiple Choice

To grant a service account permission to create pods in a specific namespace using RBAC, which steps are correct?

RBAC is about associating the right identity (the service account) with the right set of permissions for the target resources. To let a service account create pods in a specific namespace, you can define a role that allows the create action on pods and bind that role to the service account. Using a ClusterRole with a ClusterRoleBinding is a common pattern because it lets you define the permission once at the cluster level and then attach it to the service account in the desired namespace. The binding ties the cluster-wide role to that particular service account, so the service account gains the ability to create pods in that namespace while you can reuse the same ClusterRole for other namespaces or accounts if needed. This approach emphasizes how RBAC separates “what you can do” (the role) from “to whom you’re allowed to do it” (the service account) and demonstrates how cluster-scoped roles can be applied to namespace-specific identities.

RBAC is about associating the right identity (the service account) with the right set of permissions for the target resources. To let a service account create pods in a specific namespace, you can define a role that allows the create action on pods and bind that role to the service account. Using a ClusterRole with a ClusterRoleBinding is a common pattern because it lets you define the permission once at the cluster level and then attach it to the service account in the desired namespace. The binding ties the cluster-wide role to that particular service account, so the service account gains the ability to create pods in that namespace while you can reuse the same ClusterRole for other namespaces or accounts if needed. This approach emphasizes how RBAC separates “what you can do” (the role) from “to whom you’re allowed to do it” (the service account) and demonstrates how cluster-scoped roles can be applied to namespace-specific identities.