
Answer-first summary for fast verification
Answer: 1. In GKE, create a LoadBalancer Service type that uses the application‘s Pods as backend. 2. Add an annotation: cloud.google.com/load-balancer-type: Internal. 3. Peer the two VPCs together. 4. Configure the Compute Engine instance to use the address of the load balancer that has been created.
Option B is correct because it utilizes an internal load balancer to create a private IP address accessible by the Compute Engine instance after VPC peering is configured. This method is both simple and efficient, ensuring secure and direct access between the Compute Engine instance and the GKE application without traversing the public internet. Options A, C, and D either involve unnecessary complexity, expose traffic to the public internet, or fail to address the access requirement directly. For more details, refer to Google Cloud documentation on [internal load balancing](https://cloud.google.com/kubernetes-engine/docs/how-to/internal-load-balancing) and [VPC peering](https://cloud.google.com/vpc/docs/vpc-peering).
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
Your company has deployed a gaming application on Google Cloud Platform (GCP). The application runs on an autoscaling Google Kubernetes Engine (GKE) cluster, exposing a TCP endpoint, and is managed by a deployment with multiple replicas. A separate application service on Compute Engine, located in a different VPC (named ppp-network) but within the same region, requires access to the GKE-hosted application. What is the most efficient method to enable this access?
A
B
C
D