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
The CI/CD stack: Cloud Build, Cloud Deploy, Artifact Registry, Argo CD, Flux and kpt
Lesson coming
Container images and the artifacts a pipeline ships
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.)
ATwo delivery pipelines, one per environment, each creating releases from its own Git branch
BSkaffold profiles in skaffold.yaml, each pointing manifests.kustomize.paths at one overlay
CA kustomize path field in each Target definition, naming the overlay for that cluster
DA profiles list on each stage of the delivery pipeline, naming the matching Skaffold profile
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.
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?
ACloud Build triggers on the repository that run kubectl apply against every cluster with one deployer service account
BConfig Sync installed on each cluster, which pulls its configuration from the Git repository and reconciles it
CA Cloud Deploy pipeline with one target per cluster and a deploy approval on each production target
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.
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?
ACreate a new release from the same build, because each release keeps the pipeline snapshot taken when it was created
BApply the pipeline definition again, so that Cloud Deploy copies the canary strategy into rel-0412, created before the change
CDelete the delivery pipeline and re-create it from the new file, then promote rel-0412 to prod again
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.
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?
ACreate a Developer Connect connection to the GitLab host and link the repositories through it
BLink each repository to Cloud Build directly by its clone URL, without a host connection
CConnect each repository in the console with Cloud Build repositories (1st gen), the legacy option
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.
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?
ACloud Source Repositories, with one repository per application in the CI/CD project
BSecure Source Manager, with an instance in the chosen region and a repository per application
CAn Artifact Registry generic repository that stores each commit of the code as a versioned archive
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.
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?
AIt is deleted, because delete policies are evaluated before keep policies in each cleanup run
BIt is deleted on the next run, because an age condition overrides a count of most recent versions
CIt is kept, because an artifact that matches both a delete policy and a keep policy is kept
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.