Skip to main content

Associate Cloud Engineer practice question · Configuring access and security

A team running GKE needs to let a developer group create and edit Deployments only in the payments namespace of one…

A team running GKE needs to let a developer group create and edit Deployments only in the payments namespace of one cluster. IAM roles granted on the project would apply to every cluster and namespace in the project. Which Kubernetes-native mechanism should the team use to grant this narrower permission?

  • AKubernetes RBAC, using a Role in the payments namespace bound to the group with a RoleBinding
  • BKubernetes NetworkPolicy, using ingress and egress rules that select the Pods in the payments namespace
  • CWorkload Identity Federation for GKE, mapping a Kubernetes service account in payments to an IAM principal
  • DBinary Authorization, using a policy that requires attested images before Pods deploy to the payments namespace
Show the answer and explanation

Correct answer: A) Kubernetes RBAC, using a Role in the payments namespace bound to the group with a RoleBinding

Kubernetes RBAC (Roles and RoleBindings, or ClusterRoles and ClusterRoleBindings) gives fine-grained, namespace-scoped authorization inside a GKE cluster. It works alongside IAM, and GKE allows an action if either one grants it.

Why each option is right or wrong

  • A) Correct. GKE uses Kubernetes RBAC to authorize actions on objects in the cluster. A Role is scoped to a namespace, and a RoleBinding grants it to users or Google Groups in that namespace only. Project-level IAM can't be scoped this finely.
  • B) Incorrect. NetworkPolicy controls network traffic between Pods. It does not authorize users to create or edit objects through the Kubernetes API.
  • C) Incorrect. Workload Identity Federation lets Pods authenticate to Google Cloud APIs. It does not grant human users permissions on Kubernetes objects.
  • D) Incorrect. Binary Authorization checks which container images are allowed to deploy. It does not control which users may create or edit Deployments.
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.