Skip to main content

Associate Cloud Engineer practice question · Configuring access and security

A GKE cluster has Google Groups for RBAC enabled, and the team's Google Group is nested in the gke-security-groups…

A GKE cluster has Google Groups for RBAC enabled, and the team's Google Group is nested in the gke-security-groups group. The team needs read-only access to Pods in the payments namespace and no access to any other namespace. What should the administrator create?

  • AA Role in payments allowing get, list, and watch on pods, and a RoleBinding to the Group subject
  • BA ClusterRole allowing get, list, and watch on pods, and a ClusterRoleBinding to the Group subject
  • CA Role in payments allowing get, list, and watch on pods, and a RoleBinding to a User subject set to the group email
  • DThe Kubernetes Engine Viewer IAM role granted to the team's Google Group on the cluster's project
Show the answer and explanation

Correct answer: A) A Role in payments allowing get, list, and watch on pods, and a RoleBinding to the Group subject

For namespace-scoped access, create a Role in the namespace and a RoleBinding whose subject is the team's Google Group (kind Group). This works once Google Groups for RBAC is enabled on the cluster.

Why each option is right or wrong

  • A) Correct. A Role is scoped to a single namespace, and a RoleBinding grants its permissions only within that namespace. Using a subject of kind Group with the group's email applies the access to every member of the group, because the cluster has Google Groups for RBAC enabled and the group is nested in gke-security-groups.
  • B) Incorrect. A ClusterRoleBinding grants the ClusterRole's permissions across the whole cluster. The team could then read Pods in every namespace, not just payments.
  • C) Incorrect. In Kubernetes RBAC, a group must be referenced as a subject of kind Group. A User subject set to the group's email address doesn't match the group, so members wouldn't get the access.
  • D) Incorrect. IAM roles granted at the project level apply to all clusters and namespaces in that project. IAM can't limit access to a single namespace, which is what Kubernetes RBAC Roles and RoleBindings are for.
Exam domain
Configuring access and security · ~20% of Associate Cloud Engineer
Question type
Multiple choice (one answer)

Practise the full Associate Cloud Engineer exam

This question is one of a small free sample from the CertRidge Associate Cloud Engineer bank. Full practice exams match the real exam's length, time limit and domain weights, explain every option, and Review Mode re-drills the questions you miss.

Original question written from the official exam guide. Not affiliated with Google Cloud; never copied from the real exam.