Google Associate Cloud Engineer

Google Associate Cloud Engineer

Get started today

Ultimate access to all questions.


You've set up a Kubernetes deployment named Deployment-A with 3 replicas in your cluster. Deployment-B requires access to Deployment-A, but Deployment-A must not be exposed outside the cluster. What's the best approach?




Explanation:

The correct answer is D because it exposes the service on a cluster-internal IP address, making it accessible only within the cluster. This meets the requirement of not exposing Deployment-A outside the cluster.

  • Option A is incorrect as it would expose Deployment-A over the public internet.
  • Option B is incorrect because using a LoadBalancer would expose the service publicly.
  • Option C is incorrect as it involves exposing the service externally using a cloud provider's load balancer, and Ingress does not work with LoadBalancer.