Google Associate Cloud Engineer Practice Test 50

Question 490

A Kubernetes application exposes Prometheus metrics and the team wants a managed collection and query system. What Google Cloud capability fits?

  1. Use Gemini Cloud Assist in Monitoring
  2. Use Cloud Monitoring dashboards
  3. Use Cloud Monitoring Managed Service for Prometheus
  4. Configure Cloud Monitoring custom metrics

Explanation

Correct Answer

C:

Managed Service for Prometheus integrates Prometheus-compatible metric collection with Cloud Monitoring storage and querying; the decisive property here is collecting Prometheus-compatible workload metrics.

Incorrect Answers

A:

Gemini Cloud Assist offers supported contextual assistance for Google Cloud operations including observability workflows; the scenario specifies collecting Prometheus-compatible workload metrics, which differs from using AI guidance to explore monitoring issues.

B:

Monitoring dashboards arrange charts and widgets to visualize supported time-series data; this governs displaying related metrics in a dashboard, whereas the stated objective is collecting Prometheus-compatible workload metrics.

D:

Custom Cloud Monitoring metrics let applications write supported time-series values representing domain-specific behavior; its operational role is recording metrics generated by the application; the needed capability is collecting Prometheus-compatible workload metrics.

Question 491

An office network needs encrypted IPsec connectivity to a Google Cloud VPC over the public Internet. Which solution fits?

  1. Use Cloud VPN
  2. Use Cloud NAT
  3. Use a Shared VPC host project
  4. Use HA VPN

Explanation

Correct Answer

A:

Cloud VPN provides managed IPsec VPN tunnels for hybrid network connectivity; it supports establishing encrypted site-to-cloud tunnels at the appropriate resource scope.

Incorrect Answers

B:

The alternative would address allowing source-NAT egress without public VM interfaces; Cloud NAT provides managed outbound network address translation for eligible resources without exposing unsolicited inbound endpoints; the question instead requires establishing encrypted site-to-cloud tunnels.

C:

Shared VPC allows service projects to use subnets from a host project's shared network under delegated access; Applying it would target centralizing network ownership across projects, leaving the separate need for establishing encrypted site-to-cloud tunnels.

D:

For using redundant VPN interfaces for hybrid availability, this could be relevant; HA VPN uses regional high-availability gateways with two interfaces and supports Cloud Router dynamic routing; the actual request concerns establishing encrypted site-to-cloud tunnels.

Question 492

A Deployment replaces Pods frequently but clients require one consistent virtual endpoint. What resource should expose the Pods?

  1. Scale a Kubernetes Deployment replica count
  2. Configure Vertical Pod Autoscaler
  3. Use Kubernetes Service
  4. Use kubectl get pods

Explanation

Correct Answer

C:

Kubernetes Services select endpoints and provide stable discovery or networking for matching Pods; it supports providing stable service discovery for changing Pods at the appropriate resource scope.

Incorrect Answers

A:

The Deployment replicas setting controls desired Pod replicas managed through ReplicaSets; it is relevant when changing Deployment-managed Pod replicas, not when the primary need is providing stable service discovery for changing Pods.

B:

Vertical Pod Autoscaler recommends or manages CPU and memory requests according to its configured mode; this governs optimizing workload resource requests vertically, whereas the stated objective is providing stable service discovery for changing Pods.

D:

Kubectl get pods lists Pod resources and their summarized readiness and lifecycle information; this governs listing current Kubernetes Pod status, whereas the stated objective is providing stable service discovery for changing Pods.

Question 493

A firewall rule should apply to workloads running as one specific service account, even as instance names and addresses change. Which selector applies?

  1. Use VPC Flow Logs
  2. Use VPC firewall egress deny
  3. Use VPC firewall ingress allow
  4. Use firewall target service accounts

Explanation

Correct Answer

D:

VPC firewall rules can use supported service-account selectors to identify target VM interfaces; that behavior is precisely what targeting firewall traffic by workload identity calls for.

Incorrect Answers

A:

VPC Flow Logs records sampled network flow information for eligible subnet traffic; it concerns observing subnet network flow patterns, and its normal effect does not provide targeting firewall traffic by workload identity.

B:

Egress deny rules block matching traffic initiated by selected resources to the configured destinations; it concerns restricting egress network flows, and its normal effect does not provide targeting firewall traffic by workload identity.

C:

Ingress allow rules permit matching incoming connections to specified targets subject to higher-priority policies; the scenario specifies targeting firewall traffic by workload identity, which differs from allowing inbound traffic from approved sources.

Question 494

A security review asks which APIs are active in a development project. What should the operator query?

  1. Set gcloud's active project
  2. List enabled project services
  3. Pass a per-command --project flag
  4. Use gcloud services enable

Explanation

Correct Answer

B:

The Service Usage listing and its gcloud services list interface expose enabled and available service states; this corresponds to listing service enablement state, not a separate lifecycle action.

Incorrect Answers

A:

The active gcloud core/project property determines the default project for commands that honor it; it concerns persisting the project's CLI selection, and its normal effect does not provide listing service enablement state.

C:

A --project argument overrides the configured project for supported gcloud commands for that invocation; Applying it would target pinning project context at invocation time, leaving the separate need for listing service enablement state.

D:

The gcloud services enable command activates named Service Usage APIs in the selected project; the decision here is about listing service enablement state, not enabling a service through the command line.

Question 495

A contractor needs access to one eligible bucket rather than the whole project, and the grant must become ineffective after a fixed date. Choose TWO IAM controls.

  1. Bind IAM role at project scope
  2. Review IAM role permissions
  3. Use IAM deny policies
  4. Use time-based IAM Condition
  5. Bind IAM role at resource level

Explanation

Correct Answers

D:

A conditional IAM binding can compare request time with an expiry condition for supported access checks; within the multi-part workflow of limiting role scope to one bucket and applying a time restriction, this provides expiring a temporary IAM grant automatically.

E:

Resource-level IAM binding limits eligible permissions to that resource and its applicable descendants; within the multi-part workflow of limiting role scope to one bucket and applying a time restriction, this provides scoping permissions to one supported resource.

Incorrect Answers

A:

Project-level IAM bindings apply role grants across supported resources within that project; the question is specifically about limiting role scope to one bucket and applying a time restriction, rather than granting consistent access within one project.

B:

Role definitions enumerate included permissions; role names alone do not guarantee a specific API action, which supports checking what actions a role actually grants; the needed outcome is limiting role scope to one bucket and applying a time restriction.

C:

IAM deny policies can block eligible permissions for matching principals despite otherwise applicable allow grants; its focus is enforcing an explicit permission denial, rather than limiting role scope to one bucket and applying a time restriction.

Question 496

A principal has broad inherited rights but must be barred from a supported sensitive action across a resource scope. What mechanism helps?

  1. Inspect effective IAM allow bindings
  2. Bind IAM role at organization scope
  3. Use IAM deny policies
  4. Use IAM Conditions

Explanation

Correct Answer

C:

IAM deny policies can block eligible permissions for matching principals despite otherwise applicable allow grants; this corresponds to overriding applicable allows with a deny, not a separate lifecycle action.

Incorrect Answers

A:

Effective IAM access can include organization, folder, project and resource-level bindings with inheritance; it would help with tracing allow policies up the resource hierarchy, but it does not directly implement overriding applicable allows with a deny.

B:

Organization-level IAM allow bindings generally propagate to eligible child resources; its operational role is granting organization-wide audit access; the needed capability is overriding applicable allows with a deny.

D:

IAM Conditions attach supported CEL expressions to role bindings to restrict when permissions apply; that mechanism handles restricting IAM bindings with expressions; it does not configure overriding applicable allows with a deny.

Question 497

Cloud Storage uploads using a customer-managed Cloud KMS key fail even though the uploader has bucket write access. The project's Cloud Storage service agent lacks access to that key. What is the required IAM grant?

  1. Cloud KMS CryptoKey Encrypter/Decrypter on the key to the Cloud Storage service agent
  2. Cloud KMS Viewer on the key to the end user
  3. Storage Object Viewer on the bucket to the service agent
  4. Cloud SQL Client on the project to the uploader

Explanation

Correct Answer

A:

The Cloud Storage service agent, rather than the end-user uploader, performs CMEK encryption and decryption. The key-level Encrypter/Decrypter grant lets the service agent carry out these operations.

Incorrect Answers

B:

Viewer can expose metadata without giving the Cloud Storage service agent cryptographic operations on the encryption key.

C:

Object Viewer is for reading objects; it does not confer the Cloud KMS encrypt and decrypt permissions required to use a CMEK.

D:

Cloud SQL Client authorizes supported database connectivity, which is unrelated to encrypting Cloud Storage objects with a Cloud KMS key.

Question 498

A training lab's VM fleet must start each morning and stop at night without manual work. Which feature can automate the timing?

  1. Use an instance schedule
  2. Use VM startup scripts
  3. Use Shielded VM
  4. Configure OS Login

Explanation

Correct Answer

A:

What matters is automating recurring VM operating hours; Instance schedules can automate starts and stops for eligible Compute Engine VM instances.

Incorrect Answers

B:

Compute Engine startup scripts execute configured initialization commands in supported guest environments; the supported outcome is running setup commands at VM startup, while the requested result is automating recurring VM operating hours.

C:

The alternative would address enforcing supported VM boot protections; Shielded VM provides capabilities such as Secure Boot, virtual TPM and integrity monitoring; the question instead requires automating recurring VM operating hours.

D:

OS Login integrates Linux instance access with Google identities and IAM role assignments; that applies to centralizing VM SSH identity authorization; the requested task is automating recurring VM operating hours.

Question 499

Firewall rules must target centrally controlled tags rather than mutable instance network tags. Which targeting mechanism fits?

  1. Use Cloud NGFW secure tags
  2. Use VPC Flow Logs
  3. Use VPC firewall ingress allow
  4. Use firewall target service accounts

Explanation

Correct Answer

A:

What matters is selecting network targets using governed security tags; Secure Tags are resource-manager tags usable in supported Cloud NGFW policy targeting.

Incorrect Answers

B:

VPC Flow Logs records sampled network flow information for eligible subnet traffic; it concerns collecting sampled connection-flow telemetry, and its normal effect does not provide selecting network targets using governed security tags.

C:

Ingress allow rules permit matching incoming connections to specified targets subject to higher-priority policies; it is relevant when allowing inbound traffic from approved sources, not when the primary need is selecting network targets using governed security tags.

D:

This alternative focuses on applying network rules to VM service account targets; VPC firewall rules can use supported service-account selectors to identify target VM interfaces; the stem instead asks for selecting network targets using governed security tags.

Question 500

An old application has retired, but its privileged service account still exists and must not authenticate. What administrative action helps?

  1. Use service-account-level IAM policy
  2. Grant service account user role for attachment
  3. Avoid exporting service account keys
  4. Disable unused service account

Explanation

Correct Answer

D:

The requested administrative outcome is blocking authentication by an abandoned workload identity; Disabling a service account blocks its use without immediately deleting the identity and associated metadata.

Incorrect Answers

A:

A service account is an IAM resource with its own allow policy for controlling who can use or manage it; this is a distinct control for delegating access to exactly one service account, rather than blocking authentication by an abandoned workload identity.

B:

Service Account User includes the iam.serviceAccounts.actAs permission used for attaching a service account to supported resources; that solves problems involving granting actAs rights for a target service account, rather than the blocking authentication by an abandoned workload identity requirement.

C:

Managed service-account credentials are generally safer than downloadable private keys because the platform supplies short-lived tokens; it is relevant when avoiding unnecessary long-lived private keys, not when the primary need is blocking authentication by an abandoned workload identity.

Associate Cloud Engineer Practice Tests