Google Professional Cloud Developer Practice Test 59
Question 580
A Kubernetes Deployment shows three desired replicas but its pods are not managed because labels fail to match the selector. The team has tried a correction. Which measurable outcome most directly demonstrates that this issue is resolved? Select ONE best answer.
- The workload uses short-lived authorized identity and can access only intended buckets without key material in manifests.
- The Deployment maintains the required replicas with labels recognized by its controller and Service.
- The ingress application responds correctly and required sidecars are available without unintended public endpoints.
- Interactive requests terminate predictably while long jobs complete independently with verifiable status.
Explanation
Correct Answer
B:The Deployment maintains the required replicas with labels recognized by its controller and Service. This is evidence that the particular acceptance condition for GKE Deployment replicas and selectors has been met, rather than a general availability metric. The original diagnosis should have included this step: inspect Deployment selectors, Pod template labels, desired replicas, and rollout status.
Incorrect Answers
A:The workload uses short-lived authorized identity and can access only intended buckets without key material in manifests. That result could support testing of GKE pod identity without key files: GKE workload identity maps Kubernetes principals to Google Cloud permissions without requiring embedded long-lived service account JSON keys. It cannot substitute for the required control: the Deployment maintains the required replicas with labels recognized by its controller and Service.
C:The ingress application responds correctly and required sidecars are available without unintended public endpoints. In this case, the outcome to verify is that the Deployment maintains the required replicas with labels recognized by its controller and Service. It cannot substitute for the required control: the Deployment maintains the required replicas with labels recognized by its controller and Service.
D:Interactive requests terminate predictably while long jobs complete independently with verifiable status. In this case, the outcome to verify is that the Deployment maintains the required replicas with labels recognized by its controller and Service. It cannot substitute for the required control: the Deployment maintains the required replicas with labels recognized by its controller and Service.
Question 581
A production update changes the selector unexpectedly and a Service stops routing to the intended Pods. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency? Select ONE best answer.
- Inspect Deployment selectors, Pod template labels, desired replicas, and rollout status.
- Inspect the ingress process startup, host binding, runtime PORT variable, and container listening socket.
- Inspect schedule expression, time zone, target URL, job identity, and endpoint invocation policy.
- Inspect readiness and liveness probe endpoints, dependency states, Pod events, and restart counts.
Explanation
Correct Answer
A:Inspect Deployment selectors, Pod template labels, desired replicas, and rollout status. This checks the actual operating conditions relevant to GKE Deployment replicas and selectors, rather than changing a service before the failure is understood. A focused follow-up is to correct the manifest and apply it to a staging namespace, then compare desired and available Pods. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency.
Incorrect Answers
B:Inspect the ingress process startup, host binding, runtime PORT variable, and container listening socket. Cloud Run services expect the ingress container to listen on the configured port; process existence alone does not demonstrate request reachability. The first evidence should address gke deployment replicas and selectors, not this separate diagnostic path.
C:Inspect schedule expression, time zone, target URL, job identity, and endpoint invocation policy. Cloud Scheduler triggers work on a schedule, while Cloud Run request containers are not a reliable place to run an always-on system cron daemon. The first evidence should address gke deployment replicas and selectors, not this separate diagnostic path.
D:Inspect readiness and liveness probe endpoints, dependency states, Pod events, and restart counts. Readiness removes a Pod from eligible Service endpoints; liveness triggers restarts and therefore needs a different failure definition. The first evidence should address gke deployment replicas and selectors, not this separate diagnostic path.
Question 582
A production update changes the selector unexpectedly and a Service stops routing to the intended Pods. The team is choosing a sustainable solution. Which design best meets the stated requirement without broad unrelated changes? Select ONE best answer.
- Use stable matching selectors and Pod labels so the Kubernetes controller owns the intended replicas.
- Use supported multi-container configuration with one ingress container and appropriately configured sidecars.
- Choose a supported secret environment injection or mounted secret file mechanism appropriate to the application contract.
- Use Cloud Run source deployment with the appropriate build pipeline and explicitly account for the resulting container artifact.
Explanation
Correct Answer
A:Use stable matching selectors and Pod labels so the Kubernetes controller owns the intended replicas. In this scenario, a production update changes the selector unexpectedly and a Service stops routing to the intended Pods. Before rollout, inspect Deployment selectors, Pod template labels, desired replicas, and rollout status.
Incorrect Answers
B:Use supported multi-container configuration with one ingress container and appropriately configured sidecars. The reported condition is about gke deployment replicas and selectors, not this adjacent change.
C:Choose a supported secret environment injection or mounted secret file mechanism appropriate to the application contract. The reported condition is about gke deployment replicas and selectors, not this adjacent change.
D:Use Cloud Run source deployment with the appropriate build pipeline and explicitly account for the resulting container artifact. The reported condition is about gke deployment replicas and selectors, not this adjacent change.
Question 583
A production update changes the selector unexpectedly and a Service stops routing to the intended Pods. An approved limited change can be tested in a safe environment. Which implementation action most directly addresses this scenario? Select ONE best answer.
- Update application startup to honor PORT, bind appropriately, and test the image with the actual runtime contract.
- Apply the intended ingress mode and test calls from approved internal and unapproved external locations.
- Correct the manifest and apply it to a staging namespace, then compare desired and available Pods.
- Configure the cron schedule and OIDC identity, then run a one-off schedule test against the intended endpoint.
Explanation
Correct Answer
C:Correct the manifest and apply it to a staging namespace, then compare desired and available Pods. In this scenario, a production update changes the selector unexpectedly and a Service stops routing to the intended Pods. Validate the change by checking that the Deployment maintains the required replicas with labels recognized by its controller and Service.
Incorrect Answers
A:Update application startup to honor PORT, bind appropriately, and test the image with the actual runtime contract. This action changes a different concern, Cloud Run container listening port. Applying it first would leave gke deployment replicas and selectors unresolved.
B:Apply the intended ingress mode and test calls from approved internal and unapproved external locations. This action changes a different concern, Cloud Run ingress restriction. Applying it first would leave gke deployment replicas and selectors unresolved.
D:Configure the cron schedule and OIDC identity, then run a one-off schedule test against the intended endpoint. This action changes a different concern, Cloud Scheduler invoking a private service. Applying it first would leave gke deployment replicas and selectors unresolved.
Question 584
A production update changes the selector unexpectedly and a Service stops routing to the intended Pods. The team has tried a correction. Which measurable outcome most directly demonstrates that this issue is resolved? Select ONE best answer.
- The Deployment maintains the required replicas with labels recognized by its controller and Service.
- The workload uses short-lived authorized identity and can access only intended buckets without key material in manifests.
- Replica scaling follows the target utilization and keeps application capacity within tested bounds.
- The handler runs for authorized matching events with valid delivery identity and no unnecessary invocations.
Explanation
Correct Answer
A:The Deployment maintains the required replicas with labels recognized by its controller and Service. In this scenario, a production update changes the selector unexpectedly and a Service stops routing to the intended Pods. The original diagnosis should have included this step: inspect Deployment selectors, Pod template labels, desired replicas, and rollout status.
Incorrect Answers
B:The workload uses short-lived authorized identity and can access only intended buckets without key material in manifests. That result could support testing of GKE pod identity without key files: GKE workload identity maps Kubernetes principals to Google Cloud permissions without requiring embedded long-lived service account JSON keys. That may help elsewhere, but it does not make the change required for gke deployment replicas and selectors.
C:Replica scaling follows the target utilization and keeps application capacity within tested bounds. In this case, the outcome to verify is that the Deployment maintains the required replicas with labels recognized by its controller and Service. That may help elsewhere, but it does not make the change required for gke deployment replicas and selectors.
D:The handler runs for authorized matching events with valid delivery identity and no unnecessary invocations. That result could support testing of eventarc-triggered Cloud Run handler: Eventarc event routing requires compatible source filters, destination connectivity, and authorized trigger identity. That may help elsewhere, but it does not make the change required for gke deployment replicas and selectors.
Question 585
A newly started API receives requests before its database migrations and cache warmup have completed. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency? Select ONE best answer.
- Inspect readiness and liveness probe endpoints, dependency states, Pod events, and restart counts.
- Inspect cold-start distribution, request frequency, configured minimum instances, and the application's latency target.
- Inspect push endpoint URL, subscription authentication configuration, service account, and invoker IAM.
- Inspect schedule expression, time zone, target URL, job identity, and endpoint invocation policy.
Explanation
Correct Answer
A:Inspect readiness and liveness probe endpoints, dependency states, Pod events, and restart counts. Success requires that traffic avoids unready Pods without needless container restarts during normal initialization. A focused follow-up is to define separate appropriate probes and test an unready-but-running Pod and a truly deadlocked process.
Incorrect Answers
B:Inspect cold-start distribution, request frequency, configured minimum instances, and the application's latency target. Cloud Run minimum instances can reduce cold starts but incur resource charges; the correct setting depends on measured demand and service objectives. The more informative check is to inspect readiness and liveness probe endpoints, dependency states, Pod events, and restart counts.
C:Inspect push endpoint URL, subscription authentication configuration, service account, and invoker IAM. Pub/Sub push delivery can use an OIDC token for authenticated Cloud Run invocation; access is not established by topic ownership alone. The more informative check is to inspect readiness and liveness probe endpoints, dependency states, Pod events, and restart counts.
D:Inspect schedule expression, time zone, target URL, job identity, and endpoint invocation policy. Cloud Scheduler triggers work on a schedule, while Cloud Run request containers are not a reliable place to run an always-on system cron daemon. The more informative check is to inspect readiness and liveness probe endpoints, dependency states, Pod events, and restart counts.
Question 586
A newly started API receives requests before its database migrations and cache warmup have completed. The team is choosing a sustainable solution. Which design best meets the stated requirement without broad unrelated changes? Select ONE best answer.
- Use readiness to control serving eligibility and liveness only to restart genuinely unhealthy containers.
- Rollback by restoring traffic to an immutable previously healthy revision while investigating the new release.
- Use an authenticated Pub/Sub push subscription with a scoped service account and target audience.
- Choose a supported secret environment injection or mounted secret file mechanism appropriate to the application contract.
Explanation
Correct Answer
A:Use readiness to control serving eligibility and liveness only to restart genuinely unhealthy containers. The expected outcome is that traffic avoids unready Pods without needless container restarts during normal initialization. Before rollout, inspect readiness and liveness probe endpoints, dependency states, Pod events, and restart counts.
Incorrect Answers
B:Rollback by restoring traffic to an immutable previously healthy revision while investigating the new release. This design addresses Cloud Run revision rollback strategy, where Cloud Run rollbacks manipulate traffic allocation among existing revisions rather than rewriting the contents of a released revision. The case instead calls for the following: use readiness to control serving eligibility and liveness only to restart genuinely unhealthy containers.
C:Use an authenticated Pub/Sub push subscription with a scoped service account and target audience. This design addresses Pub/Sub push to Cloud Run authentication, where Pub/Sub push delivery can use an OIDC token for authenticated Cloud Run invocation; access is not established by topic ownership alone. The case instead calls for the following: use readiness to control serving eligibility and liveness only to restart genuinely unhealthy containers.
D:Choose a supported secret environment injection or mounted secret file mechanism appropriate to the application contract. For this case, readiness removes a Pod from eligible Service endpoints; liveness triggers restarts and therefore needs a different failure definition. The case instead calls for the following: use readiness to control serving eligibility and liveness only to restart genuinely unhealthy containers.
Question 587
A newly started API receives requests before its database migrations and cache warmup have completed. An approved limited change can be tested in a safe environment. Which implementation action most directly addresses this scenario? Select ONE best answer.
- Apply a representative HPA target and observe replica changes during controlled load increases and decreases.
- Set the known-good revision's traffic to the approved percentage and monitor error recovery under load.
- Define separate appropriate probes and test an unready-but-running Pod and a truly deadlocked process.
- Correct the manifest and apply it to a staging namespace, then compare desired and available Pods.
Explanation
Correct Answer
C:Define separate appropriate probes and test an unready-but-running Pod and a truly deadlocked process. Validate the change by checking that traffic avoids unready Pods without needless container restarts during normal initialization.
Incorrect Answers
A:Apply a representative HPA target and observe replica changes during controlled load increases and decreases. This action changes a different concern, GKE Horizontal Pod Autoscaler metrics. It cannot substitute for the required control: define separate appropriate probes and test an unready-but-running Pod and a truly deadlocked process.
B:Set the known-good revision's traffic to the approved percentage and monitor error recovery under load. This action changes a different concern, Cloud Run revision rollback strategy. It cannot substitute for the required control: define separate appropriate probes and test an unready-but-running Pod and a truly deadlocked process.
D:Correct the manifest and apply it to a staging namespace, then compare desired and available Pods. This action changes a different concern, GKE Deployment replicas and selectors. It cannot substitute for the required control: define separate appropriate probes and test an unready-but-running Pod and a truly deadlocked process.
Question 588
A newly started API receives requests before its database migrations and cache warmup have completed. The team has tried a correction. Which measurable outcome most directly demonstrates that this issue is resolved? Select ONE best answer.
- Permitted invocations succeed while anonymous and wrongly addressed tokens continue to be rejected.
- Traffic avoids unready Pods without needless container restarts during normal initialization.
- The job invokes the private endpoint on schedule without requiring a persistent cron process in a scale-to-zero service.
- The service accesses only approved data and does not inherit a developer's broad personal permissions.
Explanation
Correct Answer
B:Traffic avoids unready Pods without needless container restarts during normal initialization. This is evidence that the particular acceptance condition for GKE readiness versus liveness probes has been met, rather than a general availability metric. The original diagnosis should have included this step: inspect readiness and liveness probe endpoints, dependency states, Pod events, and restart counts.
Incorrect Answers
A:Permitted invocations succeed while anonymous and wrongly addressed tokens continue to be rejected. That result could support testing of authenticated Cloud Run invocation: Private Cloud Run invocation requires both valid identity evidence and applicable IAM authorization; making it public is not a substitute. It addresses a different dependency from gke readiness versus liveness probes.
C:The job invokes the private endpoint on schedule without requiring a persistent cron process in a scale-to-zero service. That result could support testing of Cloud Scheduler invoking a private service: Cloud Scheduler triggers work on a schedule, while Cloud Run request containers are not a reliable place to run an always-on system cron daemon. It addresses a different dependency from gke readiness versus liveness probes.
D:The service accesses only approved data and does not inherit a developer's broad personal permissions. That result could support testing of Cloud Run execution identity attachment: The deployed execution identity controls Google API permissions from a Cloud Run workload; user identities and deployer privileges are separate. It addresses a different dependency from gke readiness versus liveness probes.
Question 589
An engineer configures a liveness probe to fail whenever one downstream service briefly slows and creates a restart loop. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency? Select ONE best answer.
- Inspect revision history, current traffic percentages, error rates, and verified rollback candidates.
- Inspect readiness and liveness probe endpoints, dependency states, Pod events, and restart counts.
- Inspect request duration, configured timeout, downstream waits, retry behavior, and whether an immediate HTTP response is required.
- Inspect service versus revision configuration, environment variables, and which revision receives production traffic.
Explanation
Correct Answer
B:Inspect readiness and liveness probe endpoints, dependency states, Pod events, and restart counts. Success requires that traffic avoids unready Pods without needless container restarts during normal initialization. A focused follow-up is to define separate appropriate probes and test an unready-but-running Pod and a truly deadlocked process. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency.
Incorrect Answers
A:Inspect revision history, current traffic percentages, error rates, and verified rollback candidates. Cloud Run rollbacks manipulate traffic allocation among existing revisions rather than rewriting the contents of a released revision. The relevant dependency is gke readiness versus liveness probes, which this inspection alone does not establish.
C:Inspect request duration, configured timeout, downstream waits, retry behavior, and whether an immediate HTTP response is required. Cloud Run request timeouts bound synchronous request handling; raising a deadline is not a durable background processing strategy. The relevant dependency is gke readiness versus liveness probes, which this inspection alone does not establish.
D:Inspect service versus revision configuration, environment variables, and which revision receives production traffic. Cloud Run revisions are immutable snapshots of code and configuration; environment updates create a new revision rather than editing old instances. The relevant dependency is gke readiness versus liveness probes, which this inspection alone does not establish.
Question 590
An engineer configures a liveness probe to fail whenever one downstream service briefly slows and creates a restart loop. The team is choosing a sustainable solution. Which design best meets the stated requirement without broad unrelated changes? Select ONE best answer.
- Use readiness to control serving eligibility and liveness only to restart genuinely unhealthy containers.
- Keep private services authenticated and authorize only the intended caller with a suitable identity token.
- Set Cloud Run ingress exposure and IAM invocation permissions to match whether the service is internal or public.
- Set coordinated CPU, memory, and concurrency limits based on profiling rather than tuning a single value in isolation.
Explanation
Correct Answer
A:Use readiness to control serving eligibility and liveness only to restart genuinely unhealthy containers. The expected outcome is that traffic avoids unready Pods without needless container restarts during normal initialization. Before rollout, inspect readiness and liveness probe endpoints, dependency states, Pod events, and restart counts. An engineer configures a liveness probe to fail whenever one downstream service briefly slows and creates a restart loop. The team is choosing a sustainable solution.
Incorrect Answers
B:Keep private services authenticated and authorize only the intended caller with a suitable identity token. This design addresses authenticated Cloud Run invocation, where private Cloud Run invocation requires both valid identity evidence and applicable IAM authorization; making it public is not a substitute. Applying it first would leave gke readiness versus liveness probes unresolved.
C:Set Cloud Run ingress exposure and IAM invocation permissions to match whether the service is internal or public. This design addresses Cloud Run ingress restriction, where ingress controls which network paths can reach Cloud Run; IAM controls who may invoke it, and both policies can be necessary. Applying it first would leave gke readiness versus liveness probes unresolved.
D:Set coordinated CPU, memory, and concurrency limits based on profiling rather than tuning a single value in isolation. For this case, readiness removes a Pod from eligible Service endpoints; liveness triggers restarts and therefore needs a different failure definition. Applying it first would leave gke readiness versus liveness probes unresolved.