Google Cloud Professional Cloud Developer — Question 189

You are developing an application using different microservices that must remain internal to the cluster. You want the ability to configure each microservice with a specific number of replicas. You also want the ability to address a specific microservice from any other microservice in a uniform way, regardless of the number of replicas the microservice scales to. You plan to implement this solution on Google Kubernetes Engine. What should you do?

Answer options

Correct answer: A

Explanation

The correct answer is A because deploying each microservice as a Deployment and exposing it via a Service allows for load balancing and ensures that the Service DNS name can be used to reach the microservice, regardless of how many replicas are running. Options B and D incorrectly suggest using Ingress, which is not suitable for internal communication between microservices in this context, and option C uses Pods directly, which does not provide the same scalability and management features as Deployments.