Google Professional Cloud Network Engineer Question 296
Select 3Google Cloud PlatformYou are tasked with setting up a Kubernetes cluster in Google Kubernetes Engine (GKE) for your organization. The cluster must use Shared VPC to communicate with resources in other projects within the organization. Which of the following steps should you take to correctly configure the cluster with Shared VPC?
- A
Enable the Shared VPC host project and attach the service project where the GKE cluster will be created.
- B
Grant the 'Network User' IAM role for the Shared VPC network to the service account used by the GKE nodes.
- C
Assign the 'Kubernetes Engine Admin' IAM role to the Shared VPC host project.
- D
Specify the Shared VPC subnet when creating the GKE cluster.
- E
Create a separate VPC network in the service project to route traffic to the Shared VPC.
Show answer and explanation
Correct answers: A, B, D
Explanation
To configure a GKE cluster with Shared VPC, you must first enable the Shared VPC host project and attach the service project where the cluster will reside. The 'Network User' role ensures that the GKE nodes can access the Shared VPC network resources. Additionally, you must specify the Shared VPC subnet during cluster creation to ensure that the nodes are provisioned in the correct network. The 'Kubernetes Engine Admin' role and creating a separate VPC are not required for this configuration.
- A. Correct.
This is correct. The Shared VPC host project must be enabled, and the service project must be attached to allow the GKE cluster to use the Shared VPC network.
- B. Correct.
This is correct. Granting the 'Network User' role to the GKE node service account ensures that the nodes can use the Shared VPC resources, such as subnets and routes.
- C. Incorrect.
This is incorrect. The 'Kubernetes Engine Admin' role is not specific to Shared VPC configuration and is not required to set up the cluster with Shared VPC.
- D. Correct.
This is correct. When creating the GKE cluster, the Shared VPC subnet must be explicitly specified so that the cluster nodes are provisioned within the Shared VPC network.
- E. Incorrect.
This is incorrect. Creating a separate VPC network in the service project is unnecessary and would conflict with the Shared VPC setup.