Courseiva

PCSE Practice Question: Configuring Access Within a Cloud Solution Environment

A DevOps engineer needs to allow a CI/CD pipeline running in Google Kubernetes Engine (GKE) to push images to a specific Artifact Registry repository. The pipeline uses a Kubernetes service account. What is the best practice to grant this access without creating a JSON key for a Google service account?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Use Workload Identity to bind the KSA to a GSA with the Artifact Registry Writer role

Workload Identity for GKE allows you to bind a Kubernetes service account (KSA) to a Google service account (GSA). The KSA can then impersonate the GSA when accessing Google Cloud APIs, eliminating the need for service account keys.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Use a node pool with a service account that has the required roles

    Why it's wrong here

    Node-level service accounts are used for nodes, not individual pods; this would give access to all pods on the node, which is not least privilege.

  • Grant the GSA the IAM role directly on the namespace using RBAC

    Why it's wrong here

    RBAC is for Kubernetes-level authorization, not Google Cloud IAM; it cannot grant GCP permissions.

  • Use Workload Identity to bind the KSA to a GSA with the Artifact Registry Writer role

    Why this is correct

    Workload Identity enables keyless authentication by allowing the KSA to impersonate the GSA.

  • Create a JSON key for the GSA, store it as a Kubernetes secret, and mount it into the pod

    Why it's wrong here

    This involves managing keys, which is not best practice; workload identity is the recommended approach.

About these practice questions

This PCSE question is part of Courseiva's 960-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This PCSE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCSE exam.