Skip to content

Professional Cloud DevOps Engineer · Domain 1: Establishing and bootstrapping foundational infrastructure and organizational governance · 18% of the exam

Task 1.3: Designing a CI/CD architecture stack in Google Cloud, hybrid, and multicloud environments.

Cloud Build for CI, Cloud Deploy with Skaffold and Kustomize for CD, Artifact Registry, third-party tools such as Git, Argo CD, Flux and kpt, and securing the CI/CD tooling itself.

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 2

A team keeps its Kubernetes manifests as a Kustomize base with two overlays, environments/staging and environments/prod, and wants one Cloud Deploy delivery pipeline with a staging target and a prod target. Each target must get the manifests of its own overlay from the same release. Which TWO configurations are needed? (Choose TWO.)

  1. ATwo delivery pipelines, one per environment, each creating releases from its own Git branch
  2. BSkaffold profiles in skaffold.yaml, each pointing manifests.kustomize.paths at one overlay
  3. CA kustomize path field in each Target definition, naming the overlay for that cluster
  4. DA profiles list on each stage of the delivery pipeline, naming the matching Skaffold profile
  5. EA Cloud Build step that runs kustomize build once and passes the output to both targets as raw YAML
Show the answer and why
  • ATwo delivery pipelines, one per environment, each creating releases from its own Git branch

    Incorrect

    Cloud Deploy varies manifests between targets of one pipeline with Skaffold profiles; splitting the pipeline loses the single promoted release.

  • BSkaffold profiles in skaffold.yaml, each pointing manifests.kustomize.paths at one overlay

    Correct

    Each variation is a Skaffold profile, and a profile can point at its own Kustomization path.

  • CA kustomize path field in each Target definition, naming the overlay for that cluster

    Incorrect

    Targets describe where to deploy and how to run; the manifests to render come from skaffold.yaml, chosen per stage through profiles.

  • DA profiles list on each stage of the delivery pipeline, naming the matching Skaffold profile

    Correct

    The stage's profiles field names the Skaffold profiles that Cloud Deploy uses with skaffold render for that target.

  • EA Cloud Build step that runs kustomize build once and passes the output to both targets as raw YAML

    Incorrect

    A single rendered output is the same for both targets, so neither target gets its own overlay.

Cloud Deploy renders a different set of manifests per target by using a different Skaffold profile for each: the profiles are defined in skaffold.yaml (here, each pointing at a Kustomize overlay), and each stage of the delivery pipeline names the profile to use for its target.

Question 2 · choose 1

A company runs 30 GKE clusters in one fleet. Cluster-wide settings such as namespaces, RBAC bindings and network policies must come only from a reviewed Git repository, any manual change made with kubectl must be undone without someone noticing it first, and the security team wants no build server to keep credentials that can write to the clusters. Which delivery design meets these goals?

  1. ACloud Build triggers on the repository that run kubectl apply against every cluster with one deployer service account
  2. BConfig Sync installed on each cluster, which pulls its configuration from the Git repository and reconciles it
  3. CA Cloud Deploy pipeline with one target per cluster and a deploy approval on each production target
  4. DA scheduled job that compares each cluster with Git every night and files a ticket for every difference
Show the answer and why
  • ACloud Build triggers on the repository that run kubectl apply against every cluster with one deployer service account

    Incorrect

    The build pushes changes with a service account that can write to all clusters, and nothing reverts a later manual change until the next build runs.

  • BConfig Sync installed on each cluster, which pulls its configuration from the Git repository and reconciles it

    Correct

    Config Sync keeps each cluster in sync with the Git source of truth from inside GKE and prevents configuration drift, so no external builder needs write access.

  • CA Cloud Deploy pipeline with one target per cluster and a deploy approval on each production target

    Incorrect

    Cloud Deploy pushes rollouts with an execution service account that must be able to deploy to each cluster, and it does not undo changes made outside a rollout.

  • DA scheduled job that compares each cluster with Git every night and files a ticket for every difference

    Incorrect

    This only reports drift for people to fix; it neither applies the repository nor reverts manual changes on its own.

GitOps with Config Sync makes a Git repository the single source of truth: the service syncs configurations and policies to the fleet's clusters and keeps them from drifting. Push-based pipelines (Cloud Build with kubectl or Cloud Deploy) need an identity outside the cluster that can write to it and do not correct manual changes.

Question 3 · choose 1

On Monday a team created release rel-0412 in its Cloud Deploy pipeline. On Tuesday it changed the prod stage of the pipeline from the standard strategy to a canary strategy and applied the new pipeline definition. When it promotes rel-0412 to prod, Cloud Deploy reports a pipeline mismatch. How can the team have the canary strategy apply to this code?

  1. ACreate a new release from the same build, because each release keeps the pipeline snapshot taken when it was created
  2. BApply the pipeline definition again, so that Cloud Deploy copies the canary strategy into rel-0412, created before the change
  3. CDelete the delivery pipeline and re-create it from the new file, then promote rel-0412 to prod again
  4. DRoll back the prod target to its previous release first, then promote rel-0412 to prod a second time
Show the answer and why
  • ACreate a new release from the same build, because each release keeps the pipeline snapshot taken when it was created

    Correct

    Cloud Deploy stores a pipeline instance with each release so that all its deployments follow the pipeline as defined at creation; a new release picks up the changed definition.

  • BApply the pipeline definition again, so that Cloud Deploy copies the canary strategy into rel-0412, created before the change

    Incorrect

    Applying the pipeline changes the pipeline resource only; the release keeps its own snapshot, which is why the mismatch is reported.

  • CDelete the delivery pipeline and re-create it from the new file, then promote rel-0412 to prod again

    Incorrect

    Re-creating the pipeline does not rewrite the snapshot that belongs to the existing release.

  • DRoll back the prod target to its previous release first, then promote rel-0412 to prod a second time

    Incorrect

    Rollbacks are also managed with each release's own pipeline snapshot, so the extra step does not bring the canary strategy into rel-0412.

When a release is created, Cloud Deploy takes a snapshot of the delivery pipeline, called the pipeline instance, and manages every deployment of that release with it. If the pipeline or a target changes afterwards, Cloud Deploy flags a pipeline mismatch; a new release is needed to use the new definition.

Question 4 · choose 1

A company keeps its code in GitLab Enterprise Edition. Its Cloud Build triggers must build on pushes and merge requests, and release managers also need manual triggers and triggers that fire from a Pub/Sub topic for the same repositories. Connections must be created with Terraform in several projects. How should the team connect the repositories to Cloud Build?

  1. ACreate a Developer Connect connection to the GitLab host and link the repositories through it
  2. BLink each repository to Cloud Build directly by its clone URL, without a host connection
  3. CConnect each repository in the console with Cloud Build repositories (1st gen), the legacy option
  4. DCreate a Cloud Build repositories (2nd gen) host connection to GitLab and link the repositories to it
Show the answer and why
  • ACreate a Developer Connect connection to the GitLab host and link the repositories through it

    Incorrect

    Repositories linked through Developer Connect can build on push and pull request events, but they do not support manual or Pub/Sub triggers.

  • BLink each repository to Cloud Build directly by its clone URL, without a host connection

    Incorrect

    Neither connection type lets you link repositories without first creating a host connection.

  • CConnect each repository in the console with Cloud Build repositories (1st gen), the legacy option

    Incorrect

    Cloud Build repositories (1st gen) is superseded and kept only as a legacy option; 2nd gen is the one that adds programmatic connections, including Terraform.

  • DCreate a Cloud Build repositories (2nd gen) host connection to GitLab and link the repositories to it

    Correct

    2nd gen repositories need a host connection first, support push, pull request, manual, Pub/Sub and webhook triggers, and can be created with Terraform.

Cloud Build can reach GitHub, GitLab and Bitbucket repositories through Developer Connect or through Cloud Build repositories (2nd gen). Both need a host connection before repositories are linked, but only 2nd gen repositories support manual, Pub/Sub and webhook triggers, and they can be configured with Terraform, gcloud or the API.

Question 5 · choose 1

A company created its Google Cloud organization this year and has never used a Google-hosted source repository. It wants a managed, single-tenant Git service deployed in a region it chooses, with pull requests, issue tracking and IAM roles for instances and repositories, to sit at the start of its Cloud Build and Cloud Deploy pipelines. Which service fits?

  1. ACloud Source Repositories, with one repository per application in the CI/CD project
  2. BSecure Source Manager, with an instance in the chosen region and a repository per application
  3. CAn Artifact Registry generic repository that stores each commit of the code as a versioned archive
  4. DA self-managed Git server on a Compute Engine VM in the chosen region, behind Identity-Aware Proxy
Show the answer and why
  • ACloud Source Repositories, with one repository per application in the CI/CD project

    Incorrect

    Since June 17, 2024, Cloud Source Repositories is not available to new customers; an organization that never used it cannot enable its API.

  • BSecure Source Manager, with an instance in the chosen region and a repository per application

    Correct

    Secure Source Manager is a regionally deployed, single-tenant managed source code repository with pull requests, issues, and separate IAM roles for instances and repositories.

  • CAn Artifact Registry generic repository that stores each commit of the code as a versioned archive

    Incorrect

    Artifact Registry stores build artifacts and packages; it is not a Git service and has no pull requests or issue tracking.

  • DA self-managed Git server on a Compute Engine VM in the chosen region, behind Identity-Aware Proxy

    Incorrect

    A server the company patches and backs up itself is not the managed service the company asked for.

Cloud Source Repositories closed to new customers on June 17, 2024, and Google points to Secure Source Manager as the alternative: a regional, single-tenant, managed Git service with pull requests, issues, HTTPS and SSH access, and IAM roles for instances and repositories.

Question 6 · choose 1

To control storage costs, a Docker repository in Artifact Registry gets two cleanup policies: a delete policy for versions older than 90 days and a keep policy for the five most recent versions of each package. One service ships rarely, and its newest image version is 120 days old. What happens to that version when the policies run?

  1. AIt is deleted, because delete policies are evaluated before keep policies in each cleanup run
  2. BIt is deleted on the next run, because an age condition overrides a count of most recent versions
  3. CIt is kept, because an artifact that matches both a delete policy and a keep policy is kept
  4. DThe keep policy is rejected, because a repository cannot apply a delete policy and a keep policy to the same artifact
Show the answer and why
  • AIt is deleted, because delete policies are evaluated before keep policies in each cleanup run

    Incorrect

    There is no such ordering; an artifact that matches both a delete policy and a keep policy is kept.

  • BIt is deleted on the next run, because an age condition overrides a count of most recent versions

    Incorrect

    Keep policies exist to protect artifacts that delete policies would otherwise remove, whatever condition the delete policy uses.

  • CIt is kept, because an artifact that matches both a delete policy and a keep policy is kept

    Correct

    When an artifact meets the criteria of both kinds of policy, Artifact Registry keeps it, so the most recent versions survive the age rule.

  • DThe keep policy is rejected, because a repository cannot apply a delete policy and a keep policy to the same artifact

    Incorrect

    Delete and keep policies are designed to be used together on the same repository.

Artifact Registry cleanup policies combine delete policies, which name conditions such as age, with keep policies, which name conditions or a number of most recent versions to retain. Keep wins when both match. Test new policies with a dry run first; runs happen in a periodic background job and changes take effect within about a day.

Practice domain 1 →Practice all domains →