Google Associate Cloud Engineer Practice Test 42

Question 410

A Cloud Run revision needs a database password sourced from a managed secret. What should the administrator do?

  1. Update the service configuration to create a new revision
  2. Require Cloud Run authentication and grant the invoker permission to the intended principal
  3. Set supported Cloud Run ingress restrictions in addition to IAM authentication
  4. Shift Cloud Run traffic allocation back to the healthy prior revision
  5. Integrate Secret Manager with supported Cloud Run secret references and IAM

Explanation

Correct Answer

E:

Secret Manager holds credential versions; Cloud Run can expose authorized secrets as supported environment or volume data. The runtime service identity needs permission to access the secret.

Incorrect Answers

A:

The tool can update Cloud Run runtime configuration, but it cannot be substituted for the capability needed to avoid plaintext serverless credentials. Its operational effect is not equivalent.

B:

It can authorize a service-to-service Cloud Run caller; however, it does not provide the specific operation to avoid plaintext serverless credentials. The two controls serve different purposes.

C:

This mechanism is intended to restrict network ingress to a serverless service. It does not implement the required action to avoid plaintext serverless credentials, even though both are relevant to the same general service.

D:

An operator would use this action to roll back active Cloud Run request routing, chiefly when trying to recover from a bad serverless release; The current requirement is to avoid plaintext serverless credentials, which remains unresolved by that operation.

Question 411

An application requires a new environment variable value on its next Cloud Run deployment. Which choice provides the required behavior?

  1. Set supported Cloud Run ingress restrictions in addition to IAM authentication
  2. Update the service configuration to create a new revision
  3. Require Cloud Run authentication and grant the invoker permission to the intended principal
  4. Use gcloud compute ssh over a direct reachable address with appropriate access
  5. Integrate Secret Manager with supported Cloud Run secret references and IAM

Explanation

Correct Answer

B:

Cloud Run configuration changes produce new immutable revisions. The traffic target determines whether the new revision receives requests.

Incorrect Answers

A:

This setting would restrict network ingress to a serverless service. That behavior does not establish the requested ability to set a new environment value; it addresses an adjacent concern instead.

C:

While this can authorize a service-to-service Cloud Run caller, the present task requires an action to set a new environment value. This operation does not supply the behavior described in the requirements.

D:

Its purpose is to start a direct CLI SSH session to a VM. That distinction matters: the scenario calls for an action to set a new environment value, not this separate configuration task.

E:

Using this action would supply managed secrets to Cloud Run, not set a new environment value. Its function is different from the specific change described in the scenario.

Question 412

An HTTP service accidentally accepts public traffic and must be limited to internal ingress patterns. Which approach should be selected?

  1. Update the service configuration to create a new revision
  2. Require Cloud Run authentication and grant the invoker permission to the intended principal
  3. Configure the service traffic split with the candidate revision receiving 5%
  4. Integrate Secret Manager with supported Cloud Run secret references and IAM
  5. Set supported Cloud Run ingress restrictions in addition to IAM authentication

Explanation

Correct Answer

E:

Ingress settings control network request sources for the service. Authentication controls who may invoke it, so both can matter for private architectures.

Incorrect Answers

A:

Administrators use it to update Cloud Run runtime configuration, rather than to keep Cloud Run internal to approved sources. Applying it would change the wrong component of this deployment.

B:

The result of this choice would be to authorize a service-to-service Cloud Run caller. The requested outcome, to keep Cloud Run internal to approved sources, is handled at a different layer or through another operation.

C:

In a workflow for cloud run revision operations, it can canary a Cloud Run revision by percentage; This question instead asks how to keep Cloud Run internal to approved sources; substituting the former action would leave that distinct technical requirement unmet.

D:

This mechanism is intended to supply managed secrets to Cloud Run. It does not implement the required action to keep Cloud Run internal to approved sources, even though both are relevant to the same general service.

Question 413

Service traffic increases and the running Deployment is at its fixed Pod count despite available nodes. What is the most direct solution?

  1. Use suitable VPA recommendations or explicit resource sizing changes
  2. Use a Kubernetes Job with appropriate completions and parallelism
  3. Configure an HPA with appropriate workload metrics
  4. Enable or adjust GKE cluster autoscaling on a suitable node pool

Explanation

Correct Answer

C:

HPA controls replica count based on metrics. Node capacity alone does not cause a fixed-size Deployment to add Pods.

Incorrect Answers

A:

This choice is useful to right-size individual Pod resources. The stated task is to automatically scale application Pods, which requires a different mechanism or permission scope.

B:

This setting would control finite batch Pod execution. That behavior does not establish the requested ability to automatically scale application Pods; it addresses an adjacent concern instead.

D:

It can scale GKE nodes for pending replicas; however, it does not provide the specific operation to automatically scale application Pods. The two controls serve different purposes.

Question 414

In a GKE Standard cluster, new machine-learning Pods request a GPU type not offered by any current node pool. Ordinary cluster autoscaling has already reached the existing pool's limits. Which capability can create an appropriately shaped node pool for the pending Pods?

  1. Configure a Cloud SQL read replica to satisfy Kubernetes GPU scheduling
  2. Increase the replica count through HPA without changing the available node pool hardware
  3. Scale the existing CPU-only node pool beyond its limit and expect GPUs to appear
  4. Configure supported GKE node pool auto-creation with suitable GPU resource requirements and regional quota

Explanation

Correct Answer

D:

Node pool auto-creation extends cluster autoscaling by creating new node pools with supported hardware matching pending Pods. GPU requests, availability, and quotas must be compatible.

Incorrect Answers

A:

A database read replica is unrelated to Kubernetes hardware scheduling and cannot provide GPUs for training Pods.

B:

HPA creates Pods, but it does not manufacture a new GPU-capable node pool. The newly requested Pods would remain unschedulable.

C:

Scaling more nodes of the existing CPU-only machine type still leaves the requested GPU device unavailable. The scheduler requires a node pool with compatible accelerator hardware, not just additional nodes.

Question 415

Containers repeatedly suffer resource throttling and may need revised CPU and memory requests. What should the administrator do?

  1. Enable or adjust GKE cluster autoscaling on a suitable node pool
  2. Use suitable VPA recommendations or explicit resource sizing changes
  3. Drain or migrate affected workloads and remove the unused node pool
  4. Configure an HPA with appropriate workload metrics
  5. Use a Kubernetes Job with appropriate completions and parallelism

Explanation

Correct Answer

B:

Vertical resource tuning changes per-Pod requests or limits rather than the count of replicas. This addresses sizing rather than aggregate request traffic.

Incorrect Answers

A:

The tool can scale GKE nodes for pending replicas, but it cannot be substituted for the capability needed to adjust CPU and memory allocations. Its operational effect is not equivalent.

C:

In a workflow for gke node pool management, it can delete unused GKE worker capacity; This question instead asks how to adjust CPU and memory allocations; substituting the former action would leave that distinct technical requirement unmet.

D:

This choice is useful to increase Pod replicas based on load. The stated task is to adjust CPU and memory allocations, which requires a different mechanism or permission scope.

E:

Select this when the goal is to control finite batch Pod execution. Here the decisive requirement is to adjust CPU and memory allocations, and that outcome is not achieved by this action.

Question 416

A batch job should run to completion and not be endlessly replicated by an HPA. Which choice provides the required behavior?

  1. Configure a Horizontal Pod Autoscaler for the workload
  2. Use a Kubernetes Job with appropriate completions and parallelism
  3. Enable or adjust GKE cluster autoscaling on a suitable node pool
  4. Configure an HPA with appropriate workload metrics
  5. Use suitable VPA recommendations or explicit resource sizing changes

Explanation

Correct Answer

B:

Jobs model bounded tasks and record successful completion. HPA applies to supported scalable workload controllers, not as a generic batch scheduler.

Incorrect Answers

A:

The choice is aimed at a different purpose: to respond to service load by adding Pods; Even if it can scale Kubernetes workload replicas, that would not accomplish the stated requirement to complete a one-off Kubernetes workload.

C:

This setting would scale GKE nodes for pending replicas. That behavior does not establish the requested ability to complete a one-off Kubernetes workload; it addresses an adjacent concern instead.

D:

While this can increase Pod replicas based on load, the present task requires an action to complete a one-off Kubernetes workload. This operation does not supply the behavior described in the requirements.

E:

Its purpose is to right-size individual Pod resources. That distinction matters: the scenario calls for an action to complete a one-off Kubernetes workload, not this separate configuration task.

Question 417

An operator needs to view a Pod's recent standard-output error logs. How should the team proceed?

  1. Run kubectl logs for the selected Pod or container
  2. Run kubectl describe deployment with the correct namespace
  3. Inspect and fix readiness probes for the workload
  4. Adjust the liveness probe timing or failure threshold based on startup behavior

Explanation

Correct Answer

A:

kubectl retrieves container logs exposed through Kubernetes. Selecting the correct container matters for multi-container Pods.

Incorrect Answers

B:

The tool can inspect a Kubernetes controller's conditions, but it cannot be substituted for the capability needed to view Kubernetes application errors. Its operational effect is not equivalent.

C:

This mechanism is intended to control Pod traffic readiness. It does not implement the required action to view Kubernetes application errors, even though both are relevant to the same general service.

D:

The result of this choice would be to tune Kubernetes liveness detection. The requested outcome, to view Kubernetes application errors, is handled at a different layer or through another operation.

Question 418

A Deployment is not progressing and engineers need its conditions and events. What is the most direct solution?

  1. Adjust the liveness probe timing or failure threshold based on startup behavior
  2. Run kubectl logs for the selected Pod or container
  3. Run kubectl describe deployment with the correct namespace
  4. Inspect and fix readiness probes for the workload
  5. Run kubectl rollout undo on the Deployment

Explanation

Correct Answer

C:

Describing the controller surfaces replica conditions and events. Checking a public DNS record cannot reveal an internal rollout problem.

Incorrect Answers

A:

This approach can tune Kubernetes liveness detection. The requirement is to diagnose deployment rollout progress, so it controls a different part of the workflow and leaves that result unaddressed.

B:

Using this action would inspect a Pod container's emitted logs, not diagnose deployment rollout progress. Its function is different from the specific change described in the scenario.

D:

This setting would control Pod traffic readiness. That behavior does not establish the requested ability to diagnose deployment rollout progress; it addresses an adjacent concern instead.

E:

In a workflow for kubernetes control plane resource operations, it can roll back a Kubernetes Deployment; This question instead asks how to diagnose deployment rollout progress; substituting the former action would leave that distinct technical requirement unmet.

Question 419

A service endpoint exists but the application is unavailable because all Pods fail readiness. Which implementation matches this requirement?

  1. Run kubectl describe deployment with the correct namespace
  2. Inspect and fix readiness probes for the workload
  3. Run kubectl get pods with suitable namespace and output options
  4. Adjust the liveness probe timing or failure threshold based on startup behavior
  5. Run kubectl logs for the selected Pod or container

Explanation

Correct Answer

B:

Kubernetes readiness determines whether a Pod is an eligible Service endpoint. Liveness failures cause restarts but do not directly substitute for readiness gating.

Incorrect Answers

A:

While this can inspect a Kubernetes controller's conditions, the present task requires an action to restore backend eligibility after health checks. This operation does not supply the behavior described in the requirements.

C:

The choice is aimed at a different purpose: to inspect deployment Pod health; Even if it can list Kubernetes Pods and states, that would not accomplish the stated requirement to restore backend eligibility after health checks.

D:

Administrators use it to tune Kubernetes liveness detection, rather than to restore backend eligibility after health checks. Applying it would change the wrong component of this deployment.

E:

This mechanism is intended to inspect a Pod container's emitted logs. It does not implement the required action to restore backend eligibility after health checks, even though both are relevant to the same general service.

Question 420

A Pod keeps restarting because its liveness probe has an overly aggressive threshold. What should the administrator do?

  1. Adjust the liveness probe timing or failure threshold based on startup behavior
  2. Use gcloud compute ssh over a direct reachable address with appropriate access
  3. Inspect and fix readiness probes for the workload
  4. Run kubectl describe deployment with the correct namespace
  5. Run kubectl logs for the selected Pod or container

Explanation

Correct Answer

A:

Liveness probes restart containers that appear unhealthy. Misconfigured thresholds can create repeated restarts even when an application would recover.

Incorrect Answers

B:

This choice is useful to start a direct CLI SSH session to a VM. The stated task is to avoid premature health-probe restarts, which requires a different mechanism or permission scope.

C:

This setting would control Pod traffic readiness. That behavior does not establish the requested ability to avoid premature health-probe restarts; it addresses an adjacent concern instead.

D:

Using this action would inspect a Kubernetes controller's conditions, not avoid premature health-probe restarts. Its function is different from the specific change described in the scenario.

E:

It can inspect a Pod container's emitted logs; however, it does not provide the specific operation to avoid premature health-probe restarts. The two controls serve different purposes.

Associate Cloud Engineer Practice Tests