Google Cloud Professional Cloud Developer — Question 346

You are tasked with using C++ to build and deploy a microservice for an application hosted on Google Cloud. The code needs to be containerized and use several custom software libraries that your team has built. You want to minimize maintenance of the application’s underlying infrastructure. How should you deploy the microservice?

Answer options

Correct answer: B

Explanation

The correct answer is B because using Cloud Build allows you to create a container image easily and then deploy it on Cloud Run, which is designed for serverless execution and minimizes infrastructure management. Option A is incorrect as Cloud Run functions are not suitable for microservices requiring custom libraries. Options C and D involve using GKE and Compute Engine, which increase infrastructure maintenance compared to the serverless approach of Cloud Run.