Google Cloud Associate Cloud Engineer · Domain 2 of 4 · 30% of the exam

Google Cloud Associate Cloud Engineer Domain 2: Planning and Implementing a Cloud Solution

61 free practice questions for Planning and Implementing a Cloud Solution in the Google Cloud Certified Associate Cloud Engineer exam. Try each question first, then open "Show answer" for the correct option and explanation.

Planning and Implementing a Cloud Solution practice questions

  1. Question 1. A team wants to run a stateless containerized web app that scales to zero when idle, without managing clusters. Which service fits BEST?

    1. Compute Engine managed instance groups
    2. Cloud Run
    3. Google Kubernetes Engine Standard
    4. Bare Metal Solution
    Show answer

    Answer: B. Cloud Run

    Cloud Run runs containers serverlessly, scales on requests, and can scale to zero.

  2. Question 2. Which service runs a small piece of code in response to a Cloud Storage upload event with no infrastructure to manage?

    1. Compute Engine with a startup script
    2. GKE Standard with a DaemonSet
    3. Dataproc with a single node
    4. Cloud Run functions (Cloud Functions)
    Show answer

    Answer: D. Cloud Run functions (Cloud Functions)

    Functions are event-driven and serverless, which suits lightweight event processing.

  3. Question 3. An application needs full control of the operating system and a custom kernel module. Which compute option should be used?

    1. Cloud Run
    2. App Engine standard environment
    3. Compute Engine
    4. Cloud Run functions
    Show answer

    Answer: C. Compute Engine

    Compute Engine VMs give OS-level control. Serverless platforms don't allow kernel changes.

  4. Question 4. Which GKE mode has Google manage the nodes, with billing based on the resources Pods request?

    1. Autopilot
    2. Standard
    3. On-premises with GKE Enterprise only
    4. Node auto-repair mode
    Show answer

    Answer: A. Autopilot

    In Autopilot, Google provisions and manages nodes. In Standard, you manage node pools.

  5. Question 5. A batch job can tolerate interruptions and must run as cheaply as possible on VMs. What should be used?

    1. Sole-tenant nodes
    2. Committed use discounts on on-demand VMs
    3. Memory-optimized machine types
    4. Spot VMs
    Show answer

    Answer: D. Spot VMs

    Spot VMs are heavily discounted but can be preempted at any time, which suits fault-tolerant batch work.

  6. Question 6. What defines the machine type, image, and metadata used by a managed instance group to create VMs?

    1. An instance template
    2. A snapshot schedule
    3. A firewall rule
    4. A persistent disk
    Show answer

    Answer: A. An instance template

    Instance templates are immutable definitions. To change a MIG's VMs, create a new template and roll it out.

  7. Question 7. Which feature of a managed instance group recreates a VM that fails an application health check?

    1. Autoscaling
    2. Live migration
    3. Autohealing
    4. Preemption
    Show answer

    Answer: C. Autohealing

    Autohealing uses a health check to detect unhealthy instances and recreate them.

  8. Question 8. A MIG should add VMs when average CPU exceeds 60%. What should be configured?

    1. An autohealing policy with a 60% threshold
    2. A startup script that checks CPU usage
    3. A larger machine type for every VM
    4. An autoscaling policy targeting 60% CPU utilization
    Show answer

    Answer: D. An autoscaling policy targeting 60% CPU utilization

    The autoscaler adds or removes instances to keep the target metric near the set value.

  9. Question 9. Which MIG type distributes instances across several zones in a region for higher availability?

    1. A zonal managed instance group
    2. An unmanaged instance group
    3. A sole-tenant node group
    4. A regional managed instance group
    Show answer

    Answer: D. A regional managed instance group

    Regional MIGs spread VMs across zones so a zone outage doesn't take down the whole group.

  10. Question 10. Which command creates a GKE Autopilot cluster?

    1. gcloud compute clusters create my-cluster --autopilot
    2. gcloud container clusters create-auto my-cluster --region=us-central1
    3. kubectl create cluster my-cluster --auto
    4. gcloud container node-pools create my-cluster --auto
    Show answer

    Answer: B. gcloud container clusters create-auto my-cluster --region=us-central1

    create-auto creates an Autopilot cluster. Standard clusters use gcloud container clusters create.

  11. Question 11. After creating a GKE cluster, which command configures kubectl to use it?

    1. kubectl config create my-cluster
    2. gcloud auth configure-docker
    3. gcloud config set container/cluster my-cluster
    4. gcloud container clusters get-credentials my-cluster
    Show answer

    Answer: D. gcloud container clusters get-credentials my-cluster

    get-credentials writes the cluster endpoint and authentication details into kubeconfig.

  12. Question 12. Which command deploys a container image to Cloud Run?

    1. gcloud container deploy my-service --image=IMAGE_URL
    2. kubectl run my-service --image=IMAGE_URL --cloud-run
    3. gcloud run deploy my-service --image=IMAGE_URL --region=us-central1
    4. gcloud app deploy --image=IMAGE_URL --service=my-service
    Show answer

    Answer: C. gcloud run deploy my-service --image=IMAGE_URL --region=us-central1

    gcloud run deploy creates or updates a Cloud Run service with a new revision.

  13. Question 13. Where should a team store its private container images for GKE and Cloud Run?

    1. Artifact Registry
    2. Cloud Storage public buckets
    3. Secret Manager
    4. Cloud SQL
    Show answer

    Answer: A. Artifact Registry

    Artifact Registry stores container images and language packages with IAM access control. It replaces Container Registry.

  14. Question 14. A globally distributed application needs a relational database with strong consistency and horizontal scaling. Which service fits?

    1. Cloud SQL for MySQL
    2. Bigtable
    3. Cloud Spanner
    4. Firestore in Datastore mode
    Show answer

    Answer: C. Cloud Spanner

    Spanner is a globally scalable, strongly consistent relational database.

  15. Question 15. A team needs a managed MySQL database for a regional web app with standard SQL features. Which service is MOST appropriate?

    1. Cloud Spanner
    2. Bigtable
    3. Cloud SQL
    4. BigQuery
    Show answer

    Answer: C. Cloud SQL

    Cloud SQL provides managed MySQL, PostgreSQL, and SQL Server for typical transactional workloads.

  16. Question 16. Which service is best for petabyte-scale analytical SQL queries over large datasets?

    1. Cloud SQL
    2. Memorystore
    3. BigQuery
    4. Firestore
    Show answer

    Answer: C. BigQuery

    BigQuery is a serverless data warehouse for analytics.

  17. Question 17. An IoT system writes millions of time-series readings per second and needs low-latency key lookups. Which database fits?

    1. Cloud SQL
    2. BigQuery
    3. Bigtable
    4. Cloud Storage Archive class
    Show answer

    Answer: C. Bigtable

    Bigtable is a wide-column NoSQL database built for high-throughput, low-latency workloads such as time series.

  18. Question 18. A mobile app needs a serverless NoSQL document database with real-time synchronization. Which service fits?

    1. Bigtable
    2. Firestore
    3. Cloud SQL
    4. Spanner
    Show answer

    Answer: B. Firestore

    Firestore stores JSON-like documents and supports real-time listeners and offline mobile sync.

  19. Question 19. Which Cloud Storage class is cheapest for data accessed less than once a year and kept for compliance?

    1. Standard
    2. Nearline
    3. Coldline
    4. Archive
    Show answer

    Answer: D. Archive

    Archive has the lowest storage cost but the highest retrieval costs and a 365-day minimum storage duration.

  20. Question 20. Data is read about once a month for reports. Which Cloud Storage class is MOST cost-effective?

    1. Standard
    2. Archive
    3. Coldline
    4. Nearline
    Show answer

    Answer: D. Nearline

    Nearline suits data accessed about monthly (30-day minimum). Coldline suits quarterly access.

  21. Question 21. Which Cloud Storage location type stores data redundantly across two specific regions?

    1. Single region
    2. Dual-region
    3. Multi-region
    4. Zonal
    Show answer

    Answer: B. Dual-region

    Dual-region stores data in two chosen regions for high availability and performance.

  22. Question 22. How can objects move automatically from Standard to Coldline after 90 days?

    1. A Cloud Scheduler job that renames objects
    2. A retention policy on the bucket
    3. An Object Lifecycle Management rule on the bucket
    4. Object versioning with a 90-day delay
    Show answer

    Answer: C. An Object Lifecycle Management rule on the bucket

    Lifecycle rules can change storage class or delete objects based on age and other conditions.

  23. Question 23. Which command copies a local file to a Cloud Storage bucket?

    1. gcloud storage upload report.csv my-bucket
    2. gsutil put report.csv my-bucket
    3. gcloud storage cp report.csv gs://my-bucket/
    4. gcloud buckets add report.csv gs://my-bucket
    Show answer

    Answer: C. gcloud storage cp report.csv gs://my-bucket/

    gcloud storage cp (or the older gsutil cp) copies files to and from buckets.

  24. Question 24. A company must move 500 TB from its data center to Cloud Storage and has limited bandwidth. What should it use?

    1. Transfer Appliance
    2. gcloud storage cp over the internet
    3. Storage Transfer Service from another cloud only
    4. Cloud VPN with default settings
    Show answer

    Answer: A. Transfer Appliance

    Transfer Appliance is a physical device shipped to the customer, loaded with data, and returned to Google.

  25. Question 25. Which service schedules recurring transfers from Amazon S3 into Cloud Storage?

    1. Transfer Appliance
    2. Database Migration Service
    3. BigQuery Data Transfer Service for Ads
    4. Storage Transfer Service
    Show answer

    Answer: D. Storage Transfer Service

    Storage Transfer Service moves data from other clouds, HTTP sources, or other buckets, on a schedule.

  26. Question 26. Which command loads a CSV file from Cloud Storage into a BigQuery table?

    1. bq load --source_format=CSV dataset.table gs://bucket/file.csv
    2. gcloud bigquery import gs://bucket/file.csv
    3. gcloud storage cp gs://bucket/file.csv bq://dataset.table
    4. bq query --load gs://bucket/file.csv
    Show answer

    Answer: A. bq load --source_format=CSV dataset.table gs://bucket/file.csv

    bq load imports data into a table and can infer or accept a schema.

  27. Question 27. What is the difference between auto mode and custom mode VPC networks?

    1. Auto mode adds a subnet per region; custom lets you choose
    2. Auto mode is regional, while custom mode is global
    3. Custom mode networks cannot use firewall rules
    4. Auto mode networks support only IPv6 subnets
    Show answer

    Answer: A. Auto mode adds a subnet per region; custom lets you choose

    Custom mode is recommended for production because you control subnet ranges and regions.

  28. Question 28. Which command creates a custom mode VPC network?

    1. gcloud compute vpc create my-vpc --custom
    2. gcloud networks create my-vpc --mode=manual
    3. gcloud compute networks subnets create my-vpc --custom
    4. gcloud compute networks create my-vpc --subnet-mode=custom
    Show answer

    Answer: D. gcloud compute networks create my-vpc --subnet-mode=custom

    After creating the network, add subnets with gcloud compute networks subnets create.

  29. Question 29. A subnet is running out of addresses. What can be done without recreating it?

    1. Expand its primary IP range with expand-ip-range
    2. Shrink the range, then add a second primary range
    3. Move the subnet to a different region with more space
    4. Change the VPC network from custom mode to auto mode
    Show answer

    Answer: A. Expand its primary IP range with expand-ip-range

    Subnet primary ranges can be expanded (not shrunk) as long as they don't overlap other ranges.

  30. Question 30. What are the implied firewall rules in every VPC network?

    1. Allow all ingress and deny all egress
    2. Allow all traffic in both directions
    3. Deny all traffic in both directions
    4. Allow all egress and deny all ingress
    Show answer

    Answer: D. Allow all egress and deny all ingress

    The implied rules have the lowest priority, so you add higher-priority rules to allow required ingress.

  31. Question 31. A firewall rule should allow HTTP only to web servers. How should the web servers be targeted?

    1. By listing the VMs' external IPs as sources
    2. With a network tag or service account on the rule's targets
    3. By placing the rule on the Cloud Storage bucket
    4. By setting the rule priority to 0
    Show answer

    Answer: B. With a network tag or service account on the rule's targets

    Firewall rule targets can be all instances, instances with a network tag, or instances using a service account.

  32. Question 32. Which firewall rule priority value takes precedence?

    1. The highest number, such as 1000 over 100
    2. The most recently created rule
    3. The rule with the most source ranges
    4. The lowest number, such as 100 over 1000
    Show answer

    Answer: D. The lowest number, such as 100 over 1000

    Priorities range from 0 (highest) to 65535 (lowest).

  33. Question 33. Several projects must use subnets in one central network managed by the network team. What should be used?

    1. VPC peering between every pair of projects
    2. A separate VPN tunnel per project
    3. Shared VPC with a host project and service projects
    4. Copying the VPC into each project
    Show answer

    Answer: C. Shared VPC with a host project and service projects

    Shared VPC lets service projects use subnets from a host project while network admins keep control.

  34. Question 34. Two VPC networks in different organizations need private connectivity using internal IPs. Which option fits?

    1. VPC Network Peering
    2. Shared VPC across organizations
    3. Cloud NAT
    4. A global external load balancer
    Show answer

    Answer: A. VPC Network Peering

    VPC peering works across projects and organizations. Peering isn't transitive.

  35. Question 35. VMs without external IPs need to download OS updates from the internet. What should be configured?

    1. An external IP on each VM temporarily
    2. VPC peering with a public network
    3. Private Google Access only
    4. Cloud NAT on a Cloud Router in the region
    Show answer

    Answer: D. Cloud NAT on a Cloud Router in the region

    Cloud NAT provides outbound internet access without exposing VMs to inbound connections.

  36. Question 36. VMs without external IPs must reach Cloud Storage APIs. Which setting enables this?

    1. Cloud NAT is the only option
    2. Private Google Access on the subnet
    3. An external IP on each VM
    4. A dedicated interconnect
    Show answer

    Answer: B. Private Google Access on the subnet

    Private Google Access lets internal-only VMs reach Google APIs and services.

  37. Question 37. A company needs an encrypted connection from its data center to its VPC over the internet quickly and cheaply. What should it use?

    1. Cloud VPN
    2. Dedicated Interconnect
    3. Partner Interconnect with 10 Gbps
    4. Direct Peering
    Show answer

    Answer: A. Cloud VPN

    Cloud VPN (HA VPN) creates IPsec tunnels over the internet. Interconnect gives private, higher-bandwidth links.

  38. Question 38. A company needs a private 10 Gbps connection to Google Cloud that doesn't traverse the public internet, from a colocation facility where Google is present. What should it choose?

    1. HA VPN
    2. Dedicated Interconnect
    3. Cloud NAT
    4. VPC Network Peering
    Show answer

    Answer: B. Dedicated Interconnect

    Dedicated Interconnect provides direct physical connections in 10 or 100 Gbps circuits.

  39. Question 39. Which service exchanges routes dynamically with on-premises routers over BGP for VPN and Interconnect?

    1. Cloud DNS
    2. Cloud Router
    3. Cloud Load Balancing
    4. Cloud Armor
    Show answer

    Answer: B. Cloud Router

    Cloud Router uses BGP so routes update automatically when networks change.

  40. Question 40. A global HTTPS web app needs a single anycast IP and routing to the nearest healthy backend. Which load balancer fits?

    1. Regional internal passthrough Network Load Balancer
    2. Internal Application Load Balancer
    3. Global external Application Load Balancer
    4. Regional external passthrough Network Load Balancer
    Show answer

    Answer: C. Global external Application Load Balancer

    The global external Application Load Balancer (layer 7) uses one anycast IP and routes users to the closest backends.

  41. Question 41. An application needs to load-balance TCP traffic between internal services in one region, preserving client IPs. Which load balancer fits?

    1. Internal passthrough Network Load Balancer
    2. Global external Application Load Balancer
    3. External proxy Network Load Balancer
    4. Cloud CDN
    Show answer

    Answer: A. Internal passthrough Network Load Balancer

    Internal passthrough load balancers distribute TCP/UDP traffic within a VPC without proxying.

  42. Question 42. Which service hosts authoritative DNS zones, including private zones visible only inside VPC networks?

    1. Cloud Domains only
    2. Cloud CDN
    3. Cloud DNS
    4. Cloud Router
    Show answer

    Answer: C. Cloud DNS

    Cloud DNS supports public and private managed zones.

  43. Question 43. A team wants to define VPC networks, VMs, and buckets in code and apply changes consistently across environments. What should it use?

    1. Terraform with the Google provider
    2. Manual changes in the console
    3. Cloud Shell history files
    4. Billing export to BigQuery
    Show answer

    Answer: A. Terraform with the Google provider

    Terraform is a common IaC tool for Google Cloud. Infrastructure Manager can run Terraform as a managed service.

  44. Question 44. Which Google Cloud service deploys and manages infrastructure using Terraform configurations as a managed service?

    1. Cloud Deployment Manager
    2. Config Controller only
    3. Cloud Build triggers only
    4. Infrastructure Manager
    Show answer

    Answer: D. Infrastructure Manager

    Infrastructure Manager runs Terraform for you. Deployment Manager is the older, template-based service.

  45. Question 45. Where can a team quickly deploy prebuilt third-party solutions, such as a WordPress stack, onto Google Cloud?

    1. Artifact Registry
    2. Cloud Source Repositories
    3. Google Cloud Marketplace
    4. Cloud Asset Inventory
    Show answer

    Answer: C. Google Cloud Marketplace

    Marketplace offers ready-to-deploy software, some billed through Cloud Billing.

  46. Question 46. What is a key benefit of a custom machine type in Compute Engine?

    1. Choosing exact vCPU and memory amounts to fit a workload
    2. Running VMs without a boot disk
    3. Avoiding all per-second billing
    4. Guaranteeing VMs never need restarting
    Show answer

    Answer: A. Choosing exact vCPU and memory amounts to fit a workload

    Custom machine types avoid paying for resources a predefined type would over-provision.

  47. Question 47. Which disk type is backed by a replicated persistent disk in two zones of a region?

    1. Regional persistent disk
    2. Local SSD
    3. Zonal balanced persistent disk
    4. Cloud Storage FUSE mount
    Show answer

    Answer: A. Regional persistent disk

    Regional persistent disks replicate synchronously across two zones for high availability.

  48. Question 48. What happens to data on a Local SSD when the VM is stopped?

    1. It is lost, because Local SSDs are ephemeral
    2. It is saved to Cloud Storage automatically
    3. It is moved to a persistent disk
    4. It is kept for 30 days in a snapshot
    Show answer

    Answer: A. It is lost, because Local SSDs are ephemeral

    Local SSDs give very high performance but don't persist when a VM stops or is deleted.

  49. Question 49. Which Cloud Run setting keeps some instances ready to avoid cold starts?

    1. Maximum instances
    2. Concurrency
    3. Minimum instances
    4. Request timeout
    Show answer

    Answer: C. Minimum instances

    Setting minimum instances above zero keeps instances warm, at extra cost.

  50. Question 50. Cloud Run's concurrency setting controls what?

    1. The number of regions the service runs in
    2. The number of requests one container instance handles at once
    3. The number of revisions kept in history
    4. The number of users allowed to deploy
    Show answer

    Answer: B. The number of requests one container instance handles at once

    Higher concurrency means fewer instances for the same traffic. Set it to 1 for workloads that can't handle parallel requests.

  51. Question 51. Which App Engine environment runs applications in containers on Compute Engine VMs and supports custom runtimes?

    1. Flexible environment
    2. Standard environment
    3. Cloud Run for Anthos
    4. Cloud Run functions second gen
    Show answer

    Answer: A. Flexible environment

    The flexible environment runs Docker containers on VMs. The standard environment runs specific runtimes in a sandbox and can scale to zero.

  52. Question 52. A company wants a managed in-memory cache for Redis. Which service should it use?

    1. Firestore
    2. Memorystore
    3. Filestore
    4. Bigtable
    Show answer

    Answer: B. Memorystore

    Memorystore provides managed Redis and Memcached.

  53. Question 53. Several VMs need a shared NFS file system. Which service fits?

    1. Cloud Storage Nearline
    2. Filestore
    3. Persistent disk in read-write mode on all VMs
    4. Local SSD
    Show answer

    Answer: B. Filestore

    Filestore is managed NFS storage that multiple clients can mount.

  54. Question 54. Which Google Cloud product is designed for running Apache Spark and Hadoop jobs?

    1. Dataflow
    2. Pub/Sub
    3. Composer
    4. Dataproc
    Show answer

    Answer: D. Dataproc

    Dataproc runs managed Spark and Hadoop clusters. Dataflow runs Apache Beam pipelines.

  55. Question 55. Which service provides asynchronous messaging between decoupled services?

    1. Cloud Tasks only for HTTP scheduling
    2. Cloud Scheduler
    3. Pub/Sub
    4. Memorystore
    Show answer

    Answer: C. Pub/Sub

    Pub/Sub delivers messages from publishers to subscribers, supporting fan-out and buffering.

  56. Question 56. Which service runs managed stream and batch data processing pipelines written with Apache Beam?

    1. Dataproc
    2. Data Fusion only
    3. BigQuery Omni
    4. Dataflow
    Show answer

    Answer: D. Dataflow

    Dataflow autoscales Apache Beam pipelines for batch and streaming.

  57. Question 57. Which statement about GKE Standard node pools is correct?

    1. Every node in a cluster must use the same machine type
    2. Each node pool is a group of nodes with the same configuration
    3. Node pools cannot be added after cluster creation
    4. Node pools are only available in Autopilot
    Show answer

    Answer: B. Each node pool is a group of nodes with the same configuration

    Node pools let one cluster mix machine types, such as GPU and general-purpose nodes.

  58. Question 58. Which kubectl command creates or updates resources from a YAML file?

    1. kubectl get -f deployment.yaml
    2. kubectl describe deployment.yaml
    3. kubectl logs -f deployment.yaml
    4. kubectl apply -f deployment.yaml
    Show answer

    Answer: D. kubectl apply -f deployment.yaml

    kubectl apply is declarative and updates existing resources to match the file.

  59. Question 59. Which Kubernetes object exposes a Deployment inside the cluster with a stable IP and DNS name?

    1. A Service of type ClusterIP
    2. A ConfigMap
    3. A PersistentVolume
    4. A Namespace
    Show answer

    Answer: A. A Service of type ClusterIP

    Services give Pods a stable endpoint. LoadBalancer type Services add an external load balancer on GKE.

  60. Question 60. Which BigQuery pricing model charges based on the amount of data scanned by queries?

    1. Capacity (slot) pricing
    2. On-demand pricing
    3. Flat monthly per-user pricing
    4. Per-table storage pricing only
    Show answer

    Answer: B. On-demand pricing

    On-demand pricing bills per TB processed. Capacity pricing reserves slots for predictable costs.

  61. Question 61. Which Cloud SQL feature provides automatic failover to a standby instance in another zone?

    1. Read replicas in the same zone
    2. High availability (regional) configuration
    3. Automated backups only
    4. Point-in-time recovery only
    Show answer

    Answer: B. High availability (regional) configuration

    HA configuration keeps a synchronous standby in another zone. Read replicas serve reads and aren't automatic failover targets.

Google Cloud is a trademark of Google LLC. These questions are original study material, not questions from the real exam.