
Answer-first summary for fast verification
Answer: 1. Create a service account. 2. Give the Cloud Run Invoker role to that service account for your Cloud Run application. 3. Create a Cloud Pub/Sub subscription that uses that service account and uses your Cloud Run application as the push endpoint.
Option C is the correct answer. According to Google-recommended practices, Pub/Sub should push messages to the endpoint of the Cloud Run service. This can be achieved by creating a service account, giving it the Cloud Run Invoker role for the application, and creating a Cloud Pub/Sub subscription that uses the service account and the Cloud Run application as the push endpoint. This setup ensures that Cloud Run can scale to zero, as it only allocates CPU during the processing of a request, which aligns with best practices for efficient resource management.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You are planning to deploy an application on Google Cloud Run, and its primary function is to process messages from a Google Cloud Pub/Sub topic. To ensure you adhere to Google-recommended best practices for this deployment, what steps should you take?
A
B
C
D
No comments yet.