Google Professional Cloud Developer Practice Test 46
Question 450
A container passes local tests on port 5000 but Cloud Run marks it unhealthy when the process ignores the provided listening port. The team is choosing a sustainable solution. Which design best meets the stated requirement without broad unrelated changes? Select ONE best answer.
- Use Workload Identity Federation for GKE with least-privilege permissions rather than injecting static Google private keys.
- Choose a supported secret environment injection or mounted secret file mechanism appropriate to the application contract.
- Make the ingress container listen on the provided port and accessible interface rather than a hard-coded localhost binding.
- Rollback by restoring traffic to an immutable previously healthy revision while investigating the new release.
Explanation
Correct Answer
C:Make the ingress container listen on the provided port and accessible interface rather than a hard-coded localhost binding. This is the bounded design decision for Cloud Run container listening port, not a general request to widen access or replace unrelated resources. Before rollout, inspect the ingress process startup, host binding, runtime PORT variable, and container listening socket.
Incorrect Answers
A:Use Workload Identity Federation for GKE with least-privilege permissions rather than injecting static Google private keys. This design addresses GKE pod identity without key files, where GKE workload identity maps Kubernetes principals to Google Cloud permissions without requiring embedded long-lived service account JSON keys. Applying it first would leave cloud run container listening port unresolved.
B:Choose a supported secret environment injection or mounted secret file mechanism appropriate to the application contract. Applying it first would leave cloud run container listening port unresolved.
D: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. Applying it first would leave cloud run container listening port unresolved.
Question 451
A container passes local tests on port 5000 but Cloud Run marks it unhealthy when the process ignores the provided listening port. 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.
- Set the known-good revision's traffic to the approved percentage and monitor error recovery under load.
- Configure and test startup, readiness and liveness probes with a deliberately slow initialization path.
- Bind the correct Kubernetes identity and scoped storage permissions, and verify API calls in a fresh Pod.
Explanation
Correct Answer
A:Update application startup to honor PORT, bind appropriately, and test the image with the actual runtime contract. Cloud Run services expect the ingress container to listen on the configured port; process existence alone does not demonstrate request reachability. Validate the change by checking that the revision becomes ready and accepts HTTP requests on the port designated by the hosting platform.
Incorrect Answers
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. That may help elsewhere, but it does not make the change required for cloud run container listening port.
C:Configure and test startup, readiness and liveness probes with a deliberately slow initialization path. This action changes a different concern, GKE startup probe for slow initialization. That may help elsewhere, but it does not make the change required for cloud run container listening port.
D:Bind the correct Kubernetes identity and scoped storage permissions, and verify API calls in a fresh Pod. This action changes a different concern, GKE pod identity without key files. That may help elsewhere, but it does not make the change required for cloud run container listening port.
Question 452
A container passes local tests on port 5000 but Cloud Run marks it unhealthy when the process ignores the provided listening port. The team has tried a correction. Which measurable outcome most directly demonstrates that this issue is resolved? Select ONE best answer.
- The service accesses only approved data and does not inherit a developer's broad personal permissions.
- The revision becomes ready and accepts HTTP requests on the port designated by the hosting platform.
- Requests complete within the memory budget while measured instance usage and latency remain acceptable.
- Interactive requests terminate predictably while long jobs complete independently with verifiable status.
Explanation
Correct Answer
B:The revision becomes ready and accepts HTTP requests on the port designated by the hosting platform. This is evidence that the particular acceptance condition for Cloud Run container listening port has been met, rather than a general availability metric. The original diagnosis should have included this step: inspect the ingress process startup, host binding, runtime PORT variable, and container listening socket.
Incorrect Answers
A: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. A more direct response is to recognize that the revision becomes ready and accepts HTTP requests on the port designated by the hosting platform.
C:Requests complete within the memory budget while measured instance usage and latency remain acceptable. A more direct response is to recognize that the revision becomes ready and accepts HTTP requests on the port designated by the hosting platform.
D:Interactive requests terminate predictably while long jobs complete independently with verifiable status. A more direct response is to recognize that the revision becomes ready and accepts HTTP requests on the port designated by the hosting platform.
Question 453
A container binds only to loopback, so Cloud Run cannot reach the HTTP listener even though the process is running. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency? Select ONE best answer.
- Inspect the ingress process startup, host binding, runtime PORT variable, and container listening socket.
- Inspect push endpoint URL, subscription authentication configuration, service account, and invoker IAM.
- Inspect service ingress policy, authentication requirements, load-balancer path, and authorized traffic origins.
- Inspect Pod ServiceAccount, workload identity pool principal, IAM bindings, and token availability inside the Pod.
Explanation
Correct Answer
A:Inspect the ingress process startup, host binding, runtime PORT variable, and container listening socket. This checks the actual operating conditions relevant to Cloud Run container listening port, rather than changing a service before the failure is understood. A focused follow-up is to update application startup to honor PORT, bind appropriately, and test the image with the actual runtime contract. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency.
Incorrect Answers
B: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. To examine the reported mechanism, the team instead needs to inspect the ingress process startup, host binding, runtime PORT variable, and container listening socket.
C:Inspect service ingress policy, authentication requirements, load-balancer path, and authorized traffic origins. Ingress controls which network paths can reach Cloud Run; IAM controls who may invoke it, and both policies can be necessary. To examine the reported mechanism, the team instead needs to inspect the ingress process startup, host binding, runtime PORT variable, and container listening socket.
D:Inspect Pod ServiceAccount, workload identity pool principal, IAM bindings, and token availability inside the Pod. GKE workload identity maps Kubernetes principals to Google Cloud permissions without requiring embedded long-lived service account JSON keys. To examine the reported mechanism, the team instead needs to inspect the ingress process startup, host binding, runtime PORT variable, and container listening socket.
Question 454
A container binds only to loopback, so Cloud Run cannot reach the HTTP listener even though the process is running. The team is choosing a sustainable solution. Which design best meets the stated requirement without broad unrelated changes? Select ONE best answer.
- Set coordinated CPU, memory, and concurrency limits based on profiling rather than tuning a single value in isolation.
- Use a revision tag for controlled targeted testing while keeping production traffic allocation unchanged.
- Make the ingress container listen on the provided port and accessible interface rather than a hard-coded localhost binding.
- Use an authenticated Pub/Sub push subscription with a scoped service account and target audience.
Explanation
Correct Answer
C:Make the ingress container listen on the provided port and accessible interface rather than a hard-coded localhost binding. In this scenario, a container binds only to loopback, so Cloud Run cannot reach the HTTP listener even though the process is running. Before rollout, inspect the ingress process startup, host binding, runtime PORT variable, and container listening socket.
Incorrect Answers
A:Set coordinated CPU, memory, and concurrency limits based on profiling rather than tuning a single value in isolation. It cannot substitute for the required control: make the ingress container listen on the provided port and accessible interface rather than a hard-coded localhost binding.
B:Use a revision tag for controlled targeted testing while keeping production traffic allocation unchanged. This design addresses tagged Cloud Run revision validation, where revision tags provide direct revision access for testing; they do not inherently shift regular service URL traffic. It cannot substitute for the required control: make the ingress container listen on the provided port and accessible interface rather than a hard-coded localhost binding.
D: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. It cannot substitute for the required control: make the ingress container listen on the provided port and accessible interface rather than a hard-coded localhost binding.
Question 455
A container binds only to loopback, so Cloud Run cannot reach the HTTP listener even though the process is running. 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.
- Test representative large requests at proposed concurrency values and adjust resource settings or application buffering.
- Assign a tag to the candidate revision and run authenticated regression checks against its tag URL.
- Deploy a test revision from the approved source and examine the build logs and resolved container digest.
Explanation
Correct Answer
A:Update application startup to honor PORT, bind appropriately, and test the image with the actual runtime contract. In this scenario, a container binds only to loopback, so Cloud Run cannot reach the HTTP listener even though the process is running. Validate the change by checking that the revision becomes ready and accepts HTTP requests on the port designated by the hosting platform.
Incorrect Answers
B:Test representative large requests at proposed concurrency values and adjust resource settings or application buffering. This action changes a different concern, Cloud Run memory and concurrency coordination. It addresses a different dependency from cloud run container listening port.
C:Assign a tag to the candidate revision and run authenticated regression checks against its tag URL. This action changes a different concern, tagged Cloud Run revision validation. It addresses a different dependency from cloud run container listening port.
D:Deploy a test revision from the approved source and examine the build logs and resolved container digest. This action changes a different concern, Cloud Run source deployment path. It addresses a different dependency from cloud run container listening port.
Question 456
A container binds only to loopback, so Cloud Run cannot reach the HTTP listener even though the process is running. The team has tried a correction. Which measurable outcome most directly demonstrates that this issue is resolved? Select ONE best answer.
- Traffic returns to a verified version and incident evidence remains available for the bad revision.
- The revision becomes ready and accepts HTTP requests on the port designated by the hosting platform.
- The service accesses only approved data and does not inherit a developer's broad personal permissions.
- Permitted invocations succeed while anonymous and wrongly addressed tokens continue to be rejected.
Explanation
Correct Answer
B:The revision becomes ready and accepts HTTP requests on the port designated by the hosting platform. In this scenario, a container binds only to loopback, so Cloud Run cannot reach the HTTP listener even though the process is running. The original diagnosis should have included this step: inspect the ingress process startup, host binding, runtime PORT variable, and container listening socket.
Incorrect Answers
A:Traffic returns to a verified version and incident evidence remains available for the bad revision. That result could support testing of Cloud Run revision rollback strategy: Cloud Run rollbacks manipulate traffic allocation among existing revisions rather than rewriting the contents of a released revision. The reported condition is about cloud run container listening port, not this adjacent change.
C: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. The reported condition is about cloud run container listening port, not this adjacent change.
D: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. The reported condition is about cloud run container listening port, not this adjacent change.
Question 457
A team changes an environment variable on a Cloud Run service and expects the same running revision to mutate in place. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency? Select ONE best answer.
- Inspect Pod ServiceAccount, workload identity pool principal, IAM bindings, and token availability inside the Pod.
- Inspect ingress-container selection, startup dependencies, internal ports, and sidecar health or readiness.
- Inspect service ingress policy, authentication requirements, load-balancer path, and authorized traffic origins.
- Inspect service versus revision configuration, environment variables, and which revision receives production traffic.
Explanation
Correct Answer
D:Inspect service versus revision configuration, environment variables, and which revision receives production traffic. This checks the actual operating conditions relevant to Cloud Run environment configuration revisions, rather than changing a service before the failure is understood. A focused follow-up is to deploy the configuration to a tagged or no-traffic revision and verify runtime values before moving traffic.
Incorrect Answers
A:Inspect Pod ServiceAccount, workload identity pool principal, IAM bindings, and token availability inside the Pod. GKE workload identity maps Kubernetes principals to Google Cloud permissions without requiring embedded long-lived service account JSON keys. This is not the decisive inspection for cloud run environment configuration revisions.
B:Inspect ingress-container selection, startup dependencies, internal ports, and sidecar health or readiness. In multi-container Cloud Run services, the ingress container receives requests while supporting containers perform internal auxiliary work. This is not the decisive inspection for cloud run environment configuration revisions.
C:Inspect service ingress policy, authentication requirements, load-balancer path, and authorized traffic origins. Ingress controls which network paths can reach Cloud Run; IAM controls who may invoke it, and both policies can be necessary. This is not the decisive inspection for cloud run environment configuration revisions.
Question 458
A team changes an environment variable on a Cloud Run service and expects the same running revision to mutate in place. The team is choosing a sustainable solution. Which design best meets the stated requirement without broad unrelated changes? Select ONE best answer.
- Route the intended event type through Eventarc to a compatible authenticated Cloud Run destination.
- Treat configuration changes as new immutable revisions and scope debug settings to a controlled nonproduction rollout.
- Add a startup probe that gives slow applications an explicit bounded initialization window before normal probes run.
- Use supported request timeouts for bounded synchronous work and dispatch long jobs to a durable asynchronous workflow.
Explanation
Correct Answer
B:Treat configuration changes as new immutable revisions and scope debug settings to a controlled nonproduction rollout. In this scenario, a team changes an environment variable on a Cloud Run service and expects the same running revision to mutate in place. Before rollout, inspect service versus revision configuration, environment variables, and which revision receives production traffic.
Incorrect Answers
A:Route the intended event type through Eventarc to a compatible authenticated Cloud Run destination. This design addresses eventarc-triggered Cloud Run handler, where 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 cloud run environment configuration revisions.
C:Add a startup probe that gives slow applications an explicit bounded initialization window before normal probes run. This design addresses GKE startup probe for slow initialization, where Kubernetes startup probes can suppress normal liveness and readiness checks during initialization, preventing startup time from being mistaken for failure. That may help elsewhere, but it does not make the change required for cloud run environment configuration revisions.
D:Use supported request timeouts for bounded synchronous work and dispatch long jobs to a durable asynchronous workflow. For this case, Cloud Run revisions are immutable snapshots of code and configuration; environment updates create a new revision rather than editing old instances. That may help elsewhere, but it does not make the change required for cloud run environment configuration revisions.
Question 459
A team changes an environment variable on a Cloud Run service and expects the same running revision to mutate in place. An approved limited change can be tested in a safe environment. Which implementation action most directly addresses this scenario? Select ONE best answer.
- Benchmark cold and warm requests under idle and burst conditions before setting minimum instances.
- Deploy the configuration to a tagged or no-traffic revision and verify runtime values before moving traffic.
- Set the known-good revision's traffic to the approved percentage and monitor error recovery under load.
- Configure and test startup, readiness and liveness probes with a deliberately slow initialization path.
Explanation
Correct Answer
B:Deploy the configuration to a tagged or no-traffic revision and verify runtime values before moving traffic. In this scenario, a team changes an environment variable on a Cloud Run service and expects the same running revision to mutate in place. Validate the change by checking that production continues with approved configuration until the new revision is explicitly promoted.
Incorrect Answers
A:Benchmark cold and warm requests under idle and burst conditions before setting minimum instances. This action changes a different concern, minimum instances and cold-start tradeoffs. A more direct response is to deploy the configuration to a tagged or no-traffic revision and verify runtime values before moving traffic.
C: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. A more direct response is to deploy the configuration to a tagged or no-traffic revision and verify runtime values before moving traffic.
D:Configure and test startup, readiness and liveness probes with a deliberately slow initialization path. This action changes a different concern, GKE startup probe for slow initialization. A more direct response is to deploy the configuration to a tagged or no-traffic revision and verify runtime values before moving traffic.
Question 460
A team changes an environment variable on a Cloud Run service and expects the same running revision to mutate in place. The team has tried a correction. Which measurable outcome most directly demonstrates that this issue is resolved? Select ONE best answer.
- The deployed revision runs the intended commit and its built image can be traced to approved build inputs.
- Production continues with approved configuration until the new revision is explicitly promoted.
- The application reads only authorized secret content and adopts updated credentials according to documented delivery behavior.
- Requests complete within the memory budget while measured instance usage and latency remain acceptable.
Explanation
Correct Answer
B:Production continues with approved configuration until the new revision is explicitly promoted. In this scenario, a team changes an environment variable on a Cloud Run service and expects the same running revision to mutate in place. The original diagnosis should have included this step: inspect service versus revision configuration, environment variables, and which revision receives production traffic.
Incorrect Answers
A:The deployed revision runs the intended commit and its built image can be traced to approved build inputs. In this case, the outcome to verify is that production continues with approved configuration until the new revision is explicitly promoted. The case instead calls for the following: production continues with approved configuration until the new revision is explicitly promoted.
C:The application reads only authorized secret content and adopts updated credentials according to documented delivery behavior. In this case, the outcome to verify is that production continues with approved configuration until the new revision is explicitly promoted. The case instead calls for the following: production continues with approved configuration until the new revision is explicitly promoted.
D:Requests complete within the memory budget while measured instance usage and latency remain acceptable. In this case, the outcome to verify is that production continues with approved configuration until the new revision is explicitly promoted. The case instead calls for the following: production continues with approved configuration until the new revision is explicitly promoted.