Google Cloud Associate Cloud Engineer — Question 48

You have an application running in Google Kubernetes Engine (GKE) with cluster autoscaling enabled. The application exposes a TCP endpoint. There are several replicas of this application. You have a Compute Engine instance in the same region, but in another Virtual Private Cloud (VPC), called gce-network, that has no overlapping IP ranges with the first VPC. This instance needs to connect to the application on GKE. You want to minimize effort. What should you do?

Answer options

Correct answer: C

Explanation

The correct answer, C, creates a LoadBalancer service that allows the Compute Engine instance to connect internally by peering the VPCs, ensuring efficient access without exposing the service publicly. Option A does not address the need for VPC peering, while B requires additional complexity with a proxy setup that is unnecessary. Option D, while it creates a LoadBalancer, fails to enable internal access effectively without VPC peering.