Skip to content

Professional Cloud DevOps Engineer · Domain 2: Building, implementing, and maintaining CI/CD pipelines, including continuous testing, for application, infrastructure, and ML workloads · 30% of the exam

Task 2.2: Implementing and managing pipelines.

Auditing and tracking deployments, and canary, blue/green, rolling, traffic-splitting and feature-flag releases judged by success metrics from application or ML pipeline telemetry.

Study it

Sample questions

Try each one before opening the answer. Every option is explained, with the Google Cloud documentation page that proves it.

Question 1 · choose 1

A Cloud Run service is released through Cloud Deploy with a canary strategy of 10% and 50% on its prod target. Today an engineer advances each phase by hand after watching dashboards. The team wants each canary phase to run for 30 minutes and then move on without anyone acting, and if a rollout fails, the target should go back to the last good release on its own. What should the team add to the delivery pipeline?

  1. AAn automation with a promoteReleaseRule that waits 30 minutes, plus a deploy policy on the prod target
  2. BDeployment verification on the prod stage, with a verify container that checks the error rate
  3. CAn automation with an advanceRolloutRule that waits 30 minutes and a repairRolloutRule with a rollback
  4. DCanary percentages of 10, 50 and 100 with a 30-minute timeout set in the target's execution configuration
Show the answer and why
  • AAn automation with a promoteReleaseRule that waits 30 minutes, plus a deploy policy on the prod target

    Incorrect

    A promote-release rule moves a release to the next target after a successful rollout; it does not move a canary through its phases, and a deploy policy restricts actions rather than rolling back.

  • BDeployment verification on the prod stage, with a verify container that checks the error rate

    Incorrect

    Verification can fail a rollout when tests fail, but someone still has to advance each phase, and a failed verification by itself does not roll back.

  • CAn automation with an advanceRolloutRule that waits 30 minutes and a repairRolloutRule with a rollback

    Correct

    The advance rule moves a canary rollout from phase to phase after the wait time, and the repair rule can retry and then roll back to the last successful release when the rollout fails.

  • DCanary percentages of 10, 50 and 100 with a 30-minute timeout set in the target's execution configuration

    Incorrect

    100% is not allowed for a Cloud Run canary, and an execution timeout limits how long an operation may run; it does not advance phases.

Cloud Deploy automations act on a delivery pipeline without a person: advanceRolloutRule advances a canary rollout's phases, with a wait time that sets how long each phase runs, and repairRolloutRule retries a failed rollout and can roll back to the most recent successful release. promoteReleaseRule is for promoting between targets.

Question 2 · choose 1

After an incident, an auditor asks which person let last Friday's release into the production target of a Cloud Deploy pipeline, which requires approval. The project has never turned on Data Access audit logs. Where can the DevOps engineer find the answer?

  1. ANowhere: approval decisions are recorded only after Data Access audit logs for Cloud Deploy are turned on
  2. BIn the Cloud Build history of the project, in the build that Cloud Deploy ran to render the release
  3. CIn the Admin Activity audit log entries for the ApproveRollout method of Cloud Deploy
  4. DIn the Artifact Registry audit logs of the cluster pulling the new image
Show the answer and why
  • ANowhere: approval decisions are recorded only after Data Access audit logs for Cloud Deploy are turned on

    Incorrect

    Approving a rollout is an administrative write, so it is written to Admin Activity audit logs, which are always on.

  • BIn the Cloud Build history of the project, in the build that Cloud Deploy ran to render the release

    Incorrect

    Render and deploy builds show what ran in the execution environment, not which principal approved the rollout.

  • CIn the Admin Activity audit log entries for the ApproveRollout method of Cloud Deploy

    Correct

    CloudDeploy.ApproveRollout is logged as Admin Activity (clouddeploy.rollouts.approve, ADMIN_WRITE), with the principal that called it.

  • DIn the Artifact Registry audit logs of the cluster pulling the new image

    Incorrect

    Image pulls are reads by the runtime, not the approval decision, and reading artifacts is Data Access logging, which is off.

Cloud Deploy writes Admin Activity audit logs for its administrative methods, including ApproveRollout, and those logs cannot be turned off. Data Access audit logs cover reads and must be enabled, but they are not needed to find who approved a rollout.

Question 3 · choose 1

A GKE service is deployed through Cloud Deploy. After each rollout to staging, a test container must call the service's internal ClusterIP address and read its success rate; if the check fails, the rollout must fail. The team first added verify tasks to the staging stage of the delivery pipeline, but the test container cannot reach the ClusterIP. What should the team change?

  1. ADefine the test in the verify stanza of skaffold.yaml with executionMode.kubernetesCluster, and set verify to true on the stage
  2. BKeep the verify tasks in the pipeline and give the target a custom execution service account with Kubernetes Engine Developer
  3. CMove the test into a predeploy hook on the stage, so it runs as the first job of each staging rollout
  4. DReplace the test with a Cloud Monitoring uptime check on the service and require approval on the next target
Show the answer and why
  • ADefine the test in the verify stanza of skaffold.yaml with executionMode.kubernetesCluster, and set verify to true on the stage

    Correct

    Verification defined in skaffold.yaml with executionMode.kubernetesCluster runs on the application cluster, which can reach in-cluster addresses; a failed verify job fails the rollout.

  • BKeep the verify tasks in the pipeline and give the target a custom execution service account with Kubernetes Engine Developer

    Incorrect

    Verify tasks always run in the Cloud Deploy execution environment, not on the cluster; a different service account changes permissions, not where the container runs.

  • CMove the test into a predeploy hook on the stage, so it runs as the first job of each staging rollout

    Incorrect

    A predeploy hook runs before the deploy job, so it would measure the version that is about to be replaced rather than the new one.

  • DReplace the test with a Cloud Monitoring uptime check on the service and require approval on the next target

    Incorrect

    An uptime check reports to Cloud Monitoring and is not a rollout job, so it cannot fail the staging rollout; an approval only holds a later rollout to the next target.

By default, deployment verification runs in the Cloud Deploy execution environment. To run the verification containers on the GKE cluster where the application runs, define them in the verify stanza of skaffold.yaml with executionMode.kubernetesCluster and enable verify on the stage; verify tasks defined in the pipeline only run in the execution environment.

Question 4 · choose 1

A Cloud Deploy pipeline releases a GKE service with a canary strategy to a multi-target made of two regional clusters. In the 25% phase, the verify job for the europe-west1 cluster failed because a test dependency timed out, while the us-central1 cluster passed. The team wants to run that check again for europe-west1. What should the engineer do?

  1. ARetry the failed job in the controller rollout, which reruns it on every child target
  2. BAdvance the europe-west1 child rollout to the next phase and let the check run again there
  3. CIgnore the failed job in the controller rollout so that both child rollouts move on together
  4. DRetry the failed verify job in the europe-west1 child rollout
Show the answer and why
  • ARetry the failed job in the controller rollout, which reruns it on every child target

    Incorrect

    Failed jobs can't be retried in the controller rollout of a parallel deployment; retries happen in child rollouts only.

  • BAdvance the europe-west1 child rollout to the next phase and let the check run again there

    Incorrect

    Child rollouts can't be advanced; only the controller rollout advances, and it then advances the child rollouts.

  • CIgnore the failed job in the controller rollout so that both child rollouts move on together

    Incorrect

    Failed jobs can't be ignored in the controller rollout, and ignoring the job would skip the check instead of running it again.

  • DRetry the failed verify job in the europe-west1 child rollout

    Correct

    In a parallel deployment, a failed job is retried in the child rollout where it failed.

A parallel canary creates a controller rollout and one child rollout per child target. Phase advancement happens on the controller, which advances the children; retrying or ignoring a failed job happens on the child rollout that failed.

Question 5 · choose 1

Release rel-0731 has reached the staging target of a Cloud Deploy pipeline when a security issue is found in one of its libraries. Other releases must keep flowing through the pipeline as usual, but nobody may ever promote rel-0731 to production or roll a target back to it. What should the release manager do?

  1. AAdd a deploy policy to the pipeline's production target that blocks all rollouts until the library is patched
  2. BReject the pending approval for rel-0731 on the production target when someone requests it
  3. CRoll back the staging target to the previous release, so that rel-0731 is no longer the current one
  4. DRun gcloud deploy releases abandon for rel-0731, naming its delivery pipeline and its region
Show the answer and why
  • AAdd a deploy policy to the pipeline's production target that blocks all rollouts until the library is patched

    Incorrect

    A deploy policy on the target blocks every release, not only rel-0731, which stops the fixed releases from reaching production.

  • BReject the pending approval for rel-0731 on the production target when someone requests it

    Incorrect

    Rejecting one rollout does not stop a later promotion request or a rollback to the release.

  • CRoll back the staging target to the previous release, so that rel-0731 is no longer the current one

    Incorrect

    The rollback changes what runs in staging, but rel-0731 can still be promoted or chosen as a rollback target later.

  • DRun gcloud deploy releases abandon for rel-0731, naming its delivery pipeline and its region

    Correct

    An abandoned release cannot be promoted, cannot be a rollback target, and cannot be unabandoned; the rest of the pipeline is unaffected.

Abandoning a Cloud Deploy release deactivates it permanently, for example because of a bug or a security issue: it can no longer be promoted or rolled back to, and new rollouts cannot be created from it. Rollouts from it that are already in progress or queued run to completion.

Question 6 · choose 1

A change-tracking system must record every deployment that Cloud Deploy makes to any target, with its start and its outcome (succeeded, failed, cancelled), so that auditors can follow each release through the environments. The team will run a small service on a Pub/Sub push subscription. Which topic should it create and subscribe to?

  1. Aclouddeploy-operations, which carries render events and deploy events such as Start, Succeed and Failure
  2. Bclouddeploy-resources, which carries create, update and delete events for Cloud Deploy core resources
  3. Cclouddeploy-approvals, which carries the approval requests and decisions for each rollout
  4. Dclouddeploy-advances, which carries phase changes and rollouts that are ready to advance
Show the answer and why
  • Aclouddeploy-operations, which carries render events and deploy events such as Start, Succeed and Failure

    Correct

    Cloud Deploy publishes to clouddeploy-operations when it renders the Skaffold configuration and when it deploys to a target, including start, success, failure and cancellation.

  • Bclouddeploy-resources, which carries create, update and delete events for Cloud Deploy core resources

    Incorrect

    This topic reports operations on resources such as pipelines, targets and releases, not the progress and outcome of each deployment.

  • Cclouddeploy-approvals, which carries the approval requests and decisions for each rollout

    Incorrect

    Approval messages cover only rollouts that need approval, and say nothing about whether the deployment itself succeeded.

  • Dclouddeploy-advances, which carries phase changes and rollouts that are ready to advance

    Incorrect

    Advance messages describe moving between phases, such as canary percentages, not the result of each deployment.

Cloud Deploy publishes notifications to four Pub/Sub topics that you create in the project: clouddeploy-resources, clouddeploy-operations, clouddeploy-approvals and clouddeploy-advances. They let you integrate deployments with ticketing, testing or other tools through push or pull subscriptions.

Question 7 · choose 1

The prod stage of a Cloud Deploy pipeline that targets a GKE cluster uses service networking and this strategy: strategy: canary: runtimeConfig: kubernetes: serviceNetworking: service: "checkout" deployment: "checkout" canaryDeployment: percentages: [20, 60] verify: false Which phases will a rollout of a new release to prod have?

  1. Acanary-20, canary-60, then a verify phase that must pass before the stable phase starts
  2. Bcanary-20 and canary-60 only, with the switch to the new version left to the next release
  3. Ccanary-20 and canary-60, followed by a final stable phase that completes the deployment
  4. DA stable phase first, followed by canary-20 and canary-60 for the new version
Show the answer and why
  • Acanary-20, canary-60, then a verify phase that must pass before the stable phase starts

    Incorrect

    Verification runs as a job inside a phase when it is turned on, and here verify is false; the phases are the canary increments plus stable.

  • Bcanary-20 and canary-60 only, with the switch to the new version left to the next release

    Incorrect

    Every canary rollout ends with a stable phase that completes the move to the new version.

  • Ccanary-20 and canary-60, followed by a final stable phase that completes the deployment

    Correct

    Cloud Deploy creates a phase for each configured percentage plus a final stable phase for 100%.

  • DA stable phase first, followed by canary-20 and canary-60 for the new version

    Incorrect

    The canary percentages come first; the stable phase is the last phase of the rollout.

With a canary strategy, a rollout gets one phase per canary increment and a final stable phase for 100%: percentages of 25, 50 and 75 produce canary-25, canary-50, canary-75 and stable. Each phase groups the jobs of that step, such as deploy, or deploy and verify.

Question 8 · choose 1

A team deploys an internal platform through a Cloud Deploy custom target type that calls the platform's own deployment API. It now wants a progressive release on that target: 10% of traffic, then 50%, then all traffic, with its own verification job in each phase. Which Cloud Deploy canary configuration can it use?

  1. AAn automated canary that lists the percentages 10 and 50, so that Cloud Deploy apportions the traffic itself
  2. BA custom canary that defines each phase, with the team providing all the traffic-balancing setup
  3. CA custom-automated canary that names a Skaffold profile and a verify job per phase, with no traffic settings
  4. DA parallel deployment with a multi-target whose child targets each take a fixed share of the traffic
Show the answer and why
  • AAn automated canary that lists the percentages 10 and 50, so that Cloud Deploy apportions the traffic itself

    Incorrect

    Automated canaries are available for service networking, the Gateway API and Cloud Run, where Cloud Deploy can balance traffic itself; a custom target is not one of them.

  • BA custom canary that defines each phase, with the team providing all the traffic-balancing setup

    Correct

    Custom canary supports all target types; each phase sets its percentage, profile and jobs, and the team supplies the traffic balancing.

  • CA custom-automated canary that names a Skaffold profile and a verify job per phase, with no traffic settings

    Incorrect

    Custom-automated canaries leave traffic balancing to Cloud Deploy, which it can do only for service networking, the Gateway API and Cloud Run.

  • DA parallel deployment with a multi-target whose child targets each take a fixed share of the traffic

    Incorrect

    Parallel deployment sends a release to several child targets at once; it does not give one target a progressive, percentage-based rollout.

Cloud Deploy offers three kinds of canary. Automated and custom-automated canaries work with service networking, the Gateway API and Cloud Run, and Cloud Deploy creates the traffic-balancing resources. A custom canary supports every target type: you configure each phase, including its percentage, Skaffold profile and verify or hook jobs, and provide the traffic-balancing configuration yourself.

Practice domain 2 →Practice all domains →