Question

Difficulty: Very hardProvisioning Compute Engine and Kubernetes Engine Clusters

An enterprise organization is deploying an automated infrastructure pipeline using Terraform to provision core compute infrastructure in Google Cloud. The deployment includes private Google Kubernetes Engine (GKE) clusters for microservices and Managed Instance Groups (MIGs) for batch processing workloads. Security compliance policies dictate two strict requirements:
1. Access to the GKE cluster control plane endpoint for management traffic (`kubectl`) must be restricted exclusively to an internal management CIDR range (10.200.0.0/2410.200.0.0/24) without exposing management endpoints to unauthorized networks.
2. The continuous deployment service account executing compute resource creation must attach application service accounts to compute instances without gaining privileges to modify service account IAM policies or impersonate high-privilege roles.

Which TWO deployment and security configuration choices must be implemented to fulfill these requirements? (Select TWO)

  1. Enable Master Authorized Networks on the private GKE cluster and explicitly add the 10.200.0.0/2410.200.0.0/24 IP range to the authorized network configuration.Answer
  2. Grant the deployment pipeline service account the `roles/iam.serviceAccountUser` role on the specific target workload service accounts.Answer
  3. C
    Provision the GKE cluster as a private cluster without Master Authorized Networks enabled, relying on default VPC network firewall rules to block internet access to the control plane.
  4. D
    Grant the deployment pipeline service account the `roles/iam.serviceAccountAdmin` role to ensure it has required permissions to provision and manage Compute Engine instance service accounts.
  5. E
    Store the Terraform infrastructure state file in an ephemeral local directory on the CI/CD runner host to speed up compute resource provisioning operations.

Answer

To satisfy security and infrastructure provisioning requirements, you must enable Master Authorized Networks on the private GKE cluster specifying the authorized CIDR block (10.200.0.0/2410.200.0.0/24) and grant the deployment pipeline service account the `roles/iam.serviceAccountUser` role on target workload service accounts.
Enabling Master Authorized Networks ensures that only traffic originating from specified IP ranges (such as the internal management subnet 10.200.0.0/2410.200.0.0/24) can communicate with the GKE control plane endpoint. Granting the `roles/iam.serviceAccountUser` role provides the exact minimum IAM permission required for the automated deployment pipeline to provision Compute Engine instances and GKE node pools running under targeted service accounts.

Step-by-Step Solution

1
Analyze GKE Control Plane Security Requirements
Creating a private GKE cluster ensures worker nodes use private IP addresses. However, restricting administrative access (`kubectl`) to the control plane endpoint requires configuring Master Authorized Networks with the specified CIDR block (10.200.0.0/2410.200.0.0/24).
VPC firewall rules cannot filter traffic terminating on Google-managed control plane peering endpoints directly, making Master Authorized Networks the mandatory setting.
2
Evaluate IAM Role Requirements for Compute Resource Attachment
The identity running the Infrastructure as Code (IaC) deployment needs permission to assign designated service accounts to Compute Engine instances and GKE node pools.
The precise privilege required for attaching a service account to a compute instance is `roles/iam.serviceAccountUser`. Granting administrative roles such as `roles/iam.serviceAccountAdmin` or primitive Owner/Editor roles grants unnecessary security management rights.
3
Identify Correct Configuration Combination
Selecting Master Authorized Networks configuration and assigning `roles/iam.serviceAccountUser` satisfies both architectural constraints cleanly.
This combination enforces strict network perimeter security for Kubernetes cluster management and adheres to least-privilege IAM standards for automated provisioning.

Key Concept

GKE Private Cluster Control Plane Protection & Service Account User IAM Scoping
Estimated Time:3m 0s
Rate this question