Prepare and test your skills
Prepare and test your skills
Free sample question, answered and explained below. The Professional Cloud DevOps Engineer practice bank has 1,455 more like it. Try 10 free: instant score, no account.
A DevOps team manages container images in Google Cloud Artifact Registry for microservices deployed across multiple Google Kubernetes Engine (GKE) clusters in us-central1 and us-east4. Frequent CI/CD pipeline builds have caused storage costs to escalate significantly.
The team must implement an automated repository configuration that satisfies the following requirements:
release- at all times, regardless of age.stable indefinitely.Which configuration should the DevOps team implement?
This option sets up two distinct regional Artifact Registry repositories in us-central1 and us-east4 and attempts to use Cloud Storage Transfer Service alongside underlying Cloud Storage lifecycle rules to replicate and clean up objects.
release- or stable) or track dynamic version counts like keeping the 5 most recent versions.gcloud artifacts commands.You were managing raw unstructured data files inside standard Cloud Storage user buckets rather than container images inside a managed Artifact Registry repository.
This option creates a single regional repository, deploys a remote repository proxy in another region, and uses a scheduled Cloud Function via Cloud Pub/Sub to execute custom image pruning logic.
us-central1 fails to provide multi-region write resilience.The team needed to cache third-party open-source dependencies from Docker Hub locally in us-east4 to protect builds against upstream rate limits.
This option sets up the repository in the us multi-region location and configures a DELETE rule for untagged artifacts, but attempts to use Cloud IAM locks to protect release- and stable tagged images from deletion.
roles/artifactregistry.repoAdmin or roles/artifactregistry.writer) apply at the project, location, or repository level.DELETE rule without corresponding KEEP policies cannot enforce keeping specifically the 5 most recent versions of a given tag prefix.The requirement was to prevent human developers from pushing or overwriting specific repositories using IAM role bindings rather than defining automated lifecycle deletion policies.
Artifact Registry is Google Cloud's fully managed universal package manager and container registry. It allows repositories to be created in single regions (such as us-central1) or multi-regions (such as us, europe, or asia). Artifact Registry includes native Cleanup Policies (lifecycle rules) that evaluate container image tags, version counts, and artifact ages without requiring custom scripts or external schedulers.
us multi-region automatically stores and replicates artifacts across multiple data centers in the United States, providing low-latency pulls to GKE clusters in us-central1 and us-east4 without needing custom replication syncs.mostRecentVersions with keepCount: 5 and tagPrefixes: ["release-"] guarantees that the 5 latest versions matching that tag prefix are preserved even if they would otherwise match deletion criteria.tagPrefixes: ["stable"] ensures that any version bearing the stable tag is never removed, as KEEP rules always take precedence over DELETE rules in Artifact Registry policy evaluation.tagState: "UNTAGGED" with olderThan: "14d" automatically cleans up intermediate and dangling layers after two weeks.gcloud, Terraform, or the Cloud Console using JSON/YAML policy definitions.This solution relies entirely on native, declarative Google Cloud Artifact Registry features, eliminating custom script maintenance while ensuring strict governance over image lifecycle costs and multi-region availability.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated