PROFESSIONAL-CLOUD-DEVOPS-ENGINEER practice question 21 of 25
[Building and implementing CI/CD pipelines for a service] Your application images are built and pushed to Google Container Registry (GCR). You want to build an automated pipeline that deploys the application when the image is updated while minimizing the development effort. What should you do?
Full set: 205 questionsThe most direct and efficient way to trigger a deployment pipeline upon a new image push to Container Registry (GCR) is by using the built-in Pub/Sub integration. GCR automatically publishes messages to a specific Pub/Sub topic (gcr) whenever an image is pushed. Spinnaker has native support for Pub/Sub triggers, allowing it to listen to this topic and automatically start a pipeline. This approach requires minimal configuration and no custom code, directly addressing the "minimizing development effort" requirement.
A. Using Cloud Build as an intermediary adds an unnecessary step and complexity compared to the direct Pub/Sub trigger that Spinnaker natively supports.
C. This option introduces Jenkins and a custom builder, which is more complex and deviates from the goal of using a tool like Spinnaker for deployment automation.
D. Building a custom deployment service in GKE requires significant development and maintenance effort, which is the opposite of the stated goal to minimize it.
1. Google Cloud Documentation, "Configuring Container Registry for Pub/Sub notifications": "Container Registry can use Pub/Sub to publish changes to your repository... You can configure other applications, such as Spinnaker, to subscribe to these Pub/Sub messages and trigger actions such as new software deployments."
2. Spinnaker Documentation, "Google Pub/Sub Triggers": "You can use Google Cloud Pub/Sub messages to trigger Spinnaker pipelines. This is a very powerful integration, and is the basis for many of the other Google integrations in Spinnaker... For example, you can trigger a pipeline whenever a new Docker image is pushed to Google Container Registry."
Keep practicing
Take the free PROFESSIONAL-CLOUD-DEVOPS-ENGINEER practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other PROFESSIONAL-CLOUD-DEVOPS-ENGINEER practice questions
- Question 1[Building and implementing CI/CD pipelines for a service] You need to enforce several con…
- Question 2You deployed an application into a large Standard Google Kubernetes Engine (GKE) cluster.…
- Question 3You are responding to a high-priority incident where a critical, user-facing payment serv…
- Question 4[Applying Site Reliability Engineering (SRE) principles to a service] You support a user-…
- Question 5You are deploying an application that needs to access sensitive information. You need to …
- Question 6[Building and implementing CI/CD pipelines for a service] You are building an application…
