nerdexam
Google

PROFESSIONAL-CLOUD-DEVELOPER · Question #158

You are building a CI/CD pipeline that consists of a version control system, Cloud Build, and Container Registry. Each time a new tag is pushed to the repository, a Cloud Build job is triggered, which

The correct answer is D. Trigger another Cloud Build job that uses the Kubernetes CLI tools to deploy your new container. The requirements - zero downtime, fully automated testing, pre-production testing before routing users, and fast rollback - map precisely to a blue/green deployment strategy. In blue/green, the new container (green) is deployed alongside the existing production environment (blue)

Deploying applications to Kubernetes

Question

You are building a CI/CD pipeline that consists of a version control system, Cloud Build, and Container Registry. Each time a new tag is pushed to the repository, a Cloud Build job is triggered, which runs unit tests on the new code builds a new Docker container image, and pushes it into Container Registry. The last step of your pipeline should deploy the new container to your production Google Kubernetes Engine (GKE) cluster. You need to select a tool and deployment strategy that meets the following requirements:

  • Zero downtime is incurred
  • Testing is fully automated
  • Allows for testing before being rolled out to users
  • Can quickly rollback if needed

What should you do?

Options

  • ATrigger a Spinnaker pipeline configured as an A/B test of your new code and, if it is successful,
  • BTrigger a Spinnaker pipeline configured as a canary test of your new code and, if it is successful,
  • CTrigger another Cloud Build job that uses the Kubernetes CLI tools to deploy your new container
  • DTrigger another Cloud Build job that uses the Kubernetes CLI tools to deploy your new container

How the community answered

(33 responses)
  • A
    12% (4)
  • B
    6% (2)
  • C
    21% (7)
  • D
    61% (20)

Explanation

The requirements - zero downtime, fully automated testing, pre-production testing before routing users, and fast rollback - map precisely to a blue/green deployment strategy. In blue/green, the new container (green) is deployed alongside the existing production environment (blue). Automated tests run against the green environment before any user traffic is switched. Once validated, traffic is shifted atomically from blue to green. Rollback is instantaneous - just revert the traffic pointer back to blue. Option B (canary via Spinnaker) gradually shifts traffic to the new version but does not provide full pre-rollout isolation. Option C (rolling update) replaces pods incrementally but makes full rollback slower and does not allow isolated pre-production testing. Option A (A/B test) is designed for feature experimentation, not deployment validation.

Topics

#GKE Deployment Strategies#CI/CD Pipelines#Cloud Build#Kubernetes CLI

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-DEVELOPER Practice