Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Cloud Developer practice bank has an additional 608 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
You manage multiple Google Kubernetes Engine (GKE) clusters within a single Google Cloud project and need to configure Binary Authorization to enforce different security controls per environment:
us-central1-a.dev-cluster): Allow developers to deploy unsigned container images.us-east1-a.prod-cluster): Enforce that only images signed by both secure-build and prod-qualified attestors can deploy, blocking any violations.How should you configure Binary Authorization to meet these requirements?
defaultAdmissionRule with evaluationMode: REQUIRE_ATTESTATION and enforcementMode: DRYRUN_AUDIT_LOG_ONLY, add us-east1-a.prod-cluster under clusterAdmissionRules with ENFORCED_BLOCK_AND_AUDIT_LOG, and add all Google-managed system image paths to admissionWhitelistPatterns while leaving globalPolicyEvaluationMode disabled.Dry-run mode (DRYRUN_AUDIT_LOG_ONLY) is an enforcement mode that logs policy violations to Cloud Audit Logs without blocking deployments. admissionWhitelistPatterns (exempt images) explicitly bypasses Binary Authorization evaluation for matching registry paths.
defaultAdmissionRule to DRYRUN_AUDIT_LOG_ONLY allows non-conformant and unsigned images to deploy on all unspecified clusters instead of blocking them as required.globalPolicyEvaluationMode and manually maintaining Google-managed system image paths in admissionWhitelistPatterns is error-prone and discouraged because GKE system image paths can change across upgrades.us-east1-a.prod-cluster uses ENFORCED_BLOCK_AND_AUDIT_LOG, this option omits explicitly overriding us-central1-a.dev-cluster with ALWAYS_ALLOW, causing dev deployments to generate constant violation audit logs under REQUIRE_ATTESTATION.DRYRUN_AUDIT_LOG_ONLY never blocks: It is designed strictly for testing new policies in production before enforcing them.globalPolicyEvaluationMode: ENABLE is standard: It automatically allows Google-maintained system images required for GKE cluster initialization.admissionWhitelistPatterns skips attestor verification completely.You wanted to audit attestation compliance across non-production clusters without blocking any deployments while testing a new policy rollout, rather than enforcing an ALWAYS_DENY default across other clusters.
globalPolicyEvaluationMode to ENABLE, configure defaultAdmissionRule with evaluationMode: ALWAYS_DENY and enforcementMode: ENFORCED_BLOCK_AND_AUDIT_LOG, add clusterAdmissionRules for us-central1-a.dev-cluster (ALWAYS_ALLOW) and us-east1-a.prod-cluster (REQUIRE_ATTESTATION with both attestors and ENFORCED_BLOCK_AND_AUDIT_LOG), and import the policy.A Binary Authorization project-singleton policy is a single, project-wide resource that governs container image deployments across supported platforms in that Google Cloud project. It combines a project-wide default rule (defaultAdmissionRule) with optional cluster-specific rules (clusterAdmissionRules) that override the default behavior for named clusters.
us-central1-a.dev-cluster under clusterAdmissionRules with evaluationMode: ALWAYS_ALLOW overrides the restrictive default rule for that cluster, letting developers iterate with unsigned images.us-east1-a.prod-cluster under clusterAdmissionRules with evaluationMode: REQUIRE_ATTESTATION, enforcementMode: ENFORCED_BLOCK_AND_AUDIT_LOG, and both attestors in requireAttestationsBy ensures that deployments are blocked and audited unless both attestors have signed the image digest.defaultAdmissionRule to evaluationMode: ALWAYS_DENY and enforcementMode: ENFORCED_BLOCK_AND_AUDIT_LOG blocks non-exempt deployments on every other cluster in the project.globalPolicyEvaluationMode: ENABLE automatically exempts Google-maintained system images so GKE clusters can start and operate properly.clusterAdmissionRules entry matches a deployment target (location.name), Binary Authorization evaluates only that specific rule and ignores defaultAdmissionRule.requireAttestationsBy enforces an AND condition, requiring valid cryptographic attestations from all listed authorities.gcloud container binauthz policy provides version-controllable, repeatable policy administration.ENFORCED_BLOCK_AND_AUDIT_LOG records every rejected deployment attempt in Cloud Audit Logs.Because a Google Cloud project supports only one Binary Authorization policy, combining defaultAdmissionRule with clusterAdmissionRules and globalPolicyEvaluationMode: ENABLE is the native, intended design for enforcing environment-specific rules without sacrificing secure defaults or breaking GKE system components.
ALWAYS_ALLOW policy to us-central1-a.dev-cluster and a REQUIRE_ATTESTATION policy to us-east1-a.prod-cluster—while keeping the project's default policy set to ALWAYS_DENY.This option assumes you can create multiple standalone Binary Authorization deployment policies within a single Google Cloud project and attach each policy independently to a different GKE cluster.
projects/PROJECT_ID/policy) within the same project.clusterAdmissionRules, kubernetesNamespaceAdmissionRules, or kubernetesServiceAccountAdmissionRules.globalPolicyEvaluationMode to keep Google-managed GKE system images functional under an ALWAYS_DENY rule.PROJECT_SINGLETON_POLICY_ENFORCE) to evaluate against that single project policy rather than selecting among multiple policies.Each environment resided in its own dedicated Google Cloud project, where each project maintained an independent project-singleton policy tailored to that environment's security posture.
When clusters share a single project, cluster-specific rules inside the single policy act as the override mechanism for defaultAdmissionRule, eliminating the need for separate policy resources.
globalPolicyEvaluationMode to ENABLE, configure defaultAdmissionRule with evaluationMode: ALWAYS_ALLOW, add us-east1-a.prod-cluster under clusterAdmissionRules with evaluationMode: REQUIRE_ATTESTATION and enforcementMode: DRYRUN_AUDIT_LOG_ONLY, and add the production Artifact Registry path to admissionWhitelistPatterns.Setting defaultAdmissionRule to ALWAYS_ALLOW permits every container image to deploy unless overridden by a more specific rule. Adding a registry path to admissionWhitelistPatterns marks all matching images as exempt, causing Binary Authorization to skip all rule evaluation for them.
defaultAdmissionRule to ALWAYS_ALLOW permits unsigned and unauthorized images on every cluster in the project other than production, directly contradicting the requirement to block deployments on all other clusters.enforcementMode: DRYRUN_AUDIT_LOG_ONLY on us-east1-a.prod-cluster permits unverified images to run in production while only recording audit log entries.admissionWhitelistPatterns exempts production images from Binary Authorization rules altogether, meaning neither secure-build nor prod-qualified attestations would be verified.ALWAYS_ALLOW offers no protection: It acts as a pass-through for any cluster without a stricter clusterAdmissionRules override.admissionWhitelistPatterns are always allowed regardless of evaluationMode or requireAttestationsBy.ENFORCED_BLOCK_AND_AUDIT_LOG to prevent unauthorized workloads from starting.You wanted open deployments everywhere by default, only wanted to log—not block—missing attestations in production, and intended to bypass checks for trusted registries.
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