Google Cloud Associate Cloud Engineer · Domain 3 of 4 · 27% of the exam

Google Cloud Associate Cloud Engineer Domain 3: Ensuring Successful Operation of a Cloud Solution

53 free practice questions for Ensuring Successful Operation of 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.

Ensuring Successful Operation of a Cloud Solution practice questions

  1. Question 1. Which command connects to a Linux VM over SSH, handling keys automatically?

    1. gcloud compute ssh my-vm --zone=us-central1-a
    2. gcloud compute connect my-vm --zone=us-central1-a
    3. gcloud ssh create my-vm --zone=us-central1-a
    4. kubectl exec my-vm -- bash
    Show answer

    Answer: A. gcloud compute ssh my-vm --zone=us-central1-a

    gcloud compute ssh manages SSH keys through metadata or OS Login.

  2. Question 2. VMs have no external IP addresses. How can administrators still SSH to them without a bastion host?

    1. Assign a temporary external IP to each VM
    2. Enable Cloud NAT for inbound SSH connections
    3. Use IAP TCP forwarding with a firewall rule allowing the IAP range
    4. Open port 22 to 0.0.0.0/0 on the firewall
    Show answer

    Answer: C. Use IAP TCP forwarding with a firewall rule allowing the IAP range

    Identity-Aware Proxy tunnels SSH through Google, checking IAM before connecting. Allow ingress from 35.235.240.0/20.

  3. Question 3. What does enabling OS Login on VMs provide?

    1. Automatic patching of the operating system
    2. SSH access controlled through IAM roles
    3. Encryption of the VM's boot disk with CMEK
    4. A graphical remote desktop for Linux VMs
    Show answer

    Answer: B. SSH access controlled through IAM roles

    OS Login links Linux accounts to Google identities, so access is granted and revoked through IAM.

  4. Question 4. A VM's machine type needs more memory. What must be done first?

    1. Detach the boot disk while it runs
    2. Create a snapshot and delete the VM
    3. Nothing; the change applies live
    4. Stop the VM, then change the machine type
    Show answer

    Answer: D. Stop the VM, then change the machine type

    Machine type changes require the VM to be stopped.

  5. Question 5. Which resource captures a point-in-time, incremental backup of a persistent disk?

    1. A snapshot
    2. An instance template
    3. A custom image family
    4. A machine image of a bucket
    Show answer

    Answer: A. A snapshot

    Snapshots are incremental and can be scheduled with snapshot schedules.

  6. Question 6. How can daily disk snapshots be automated with a 14-day retention period?

    1. Attach a snapshot schedule resource policy to the disk
    2. Write a cron job on the VM that copies files
    3. Create a Cloud Storage lifecycle rule
    4. Use a managed instance group autohealer
    Show answer

    Answer: A. Attach a snapshot schedule resource policy to the disk

    Snapshot schedules create snapshots at set times and delete them after the retention period.

  7. Question 7. A team wants every new VM to start from the same hardened OS configuration. What should they create?

    1. A snapshot schedule on each disk
    2. A custom image, ideally in an image family
    3. A firewall rule with a network tag
    4. A Cloud Run revision
    Show answer

    Answer: B. A custom image, ideally in an image family

    Custom images capture a configured boot disk. Image families point to the latest image version.

  8. Question 8. Which resource captures a VM's full configuration, including all attached disks and metadata, for backup or cloning?

    1. A disk snapshot
    2. An instance template
    3. A machine image
    4. A custom image
    Show answer

    Answer: C. A machine image

    Machine images store the whole VM configuration and disk data. Snapshots cover a single disk.

  9. Question 9. A MIG must be updated to a new instance template gradually without downtime. What should be used?

    1. Deleting the group and recreating it from scratch
    2. Manually deleting one VM at a time from the console
    3. A rolling update with surge and unavailability limits
    4. A new autoscaling policy based on CPU usage
    Show answer

    Answer: C. A rolling update with surge and unavailability limits

    Rolling updates replace instances gradually according to the settings you choose.

  10. Question 10. Which command lists VMs in the current project?

    1. gcloud compute instances list
    2. gcloud compute vms show
    3. gcloud instances describe all
    4. gcloud compute list instances
    Show answer

    Answer: A. gcloud compute instances list

    gcloud compute instances list shows names, zones, status, and IPs.

  11. Question 11. A GKE Standard cluster's nodes are full and Pods are Pending. What should be enabled?

    1. Horizontal Pod Autoscaler only
    2. A larger Cloud SQL tier
    3. Cluster autoscaler on the node pool
    4. Vertical Pod Autoscaler only
    Show answer

    Answer: C. Cluster autoscaler on the node pool

    The cluster autoscaler adds nodes when Pods can't be scheduled. HPA adds Pods, which still need capacity.

  12. Question 12. Which Kubernetes resource scales the number of Pod replicas based on CPU utilization?

    1. HorizontalPodAutoscaler
    2. ClusterAutoscaler
    3. PodDisruptionBudget
    4. ResourceQuota
    Show answer

    Answer: A. HorizontalPodAutoscaler

    The HPA adjusts the replica count of a Deployment based on metrics.

  13. Question 13. Which command changes the number of replicas of a Deployment to 5?

    1. kubectl set replicas web 5
    2. kubectl scale deployment web --replicas=5
    3. gcloud container clusters resize web --replicas=5
    4. kubectl apply replicas=5 web
    Show answer

    Answer: B. kubectl scale deployment web --replicas=5

    kubectl scale changes the replica count immediately.

  14. Question 14. Which command adds a node pool with GPU nodes to an existing GKE Standard cluster?

    1. kubectl create nodepool gpu-pool --cluster=my-cluster --accelerator=type=nvidia-l4,count=1
    2. gcloud compute instances create gpu-pool --cluster=my-cluster --accelerator=type=nvidia-l4
    3. gcloud container clusters update my-cluster --add-node-pool=gpu-pool --gpu-type=nvidia-l4
    4. gcloud container node-pools create gpu-pool --cluster=my-cluster --accelerator=type=nvidia-l4,count=1
    Show answer

    Answer: D. gcloud container node-pools create gpu-pool --cluster=my-cluster --accelerator=type=nvidia-l4,count=1

    Node pools are created with gcloud container node-pools create, with machine and accelerator options.

  15. Question 15. A Cloud Run service has a new revision. How can 10% of traffic be sent to it for testing?

    1. Deploy the revision to a different region only
    2. Create a second service and change DNS weights manually
    3. Scale the old revision to zero instances
    4. Use gcloud run services update-traffic to split traffic between revisions
    Show answer

    Answer: D. Use gcloud run services update-traffic to split traffic between revisions

    Cloud Run supports traffic splitting by percentage and tagged revisions for testing.

  16. Question 16. A new Cloud Run revision has a bug. How can it be rolled back quickly?

    1. Delete the service and redeploy from scratch
    2. Stop the Cloud Run instance through SSH
    3. Route 100% of traffic to the previous revision
    4. Change the container image tag in Artifact Registry
    Show answer

    Answer: C. Route 100% of traffic to the previous revision

    Previous revisions remain available, so traffic can be shifted back immediately.

  17. Question 17. Which Cloud Storage feature keeps older versions of objects when they are overwritten or deleted?

    1. Lifecycle management
    2. Requester Pays
    3. Object Versioning
    4. Uniform bucket-level access
    Show answer

    Answer: C. Object Versioning

    Versioning keeps noncurrent versions, which lifecycle rules can later delete.

  18. Question 18. Objects in a bucket must not be deleted or changed for 7 years for compliance. What should be configured?

    1. A retention policy, locked if it must be permanent
    2. Object Versioning with no lifecycle rules
    3. A Nearline storage class
    4. A signed URL with a long expiry
    Show answer

    Answer: A. A retention policy, locked if it must be permanent

    Retention policies prevent deletion until the retention period passes. Locking makes the policy irreversible.

  19. Question 19. How can Cloud SQL be protected against accidental data deletion from a bad query an hour ago?

    1. Add a read replica in another region
    2. Increase the instance's machine tier
    3. Restore using point-in-time recovery
    4. Enable the high availability configuration
    Show answer

    Answer: C. Restore using point-in-time recovery

    Point-in-time recovery uses binary or write-ahead logs to restore to a specific moment.

  20. Question 20. Which Cloud SQL feature reduces read load on the primary instance?

    1. Read replicas
    2. High availability standby
    3. Automated backups
    4. Maintenance windows
    Show answer

    Answer: A. Read replicas

    Read replicas serve read traffic. The HA standby doesn't serve reads.

  21. Question 21. How can an analyst estimate how much data a BigQuery query will scan before running it?

    1. Run the query and check the bill the next day
    2. Export the table to Cloud Storage first
    3. Use gcloud storage du on the dataset
    4. Run it as a dry run, or check the estimate in the query editor
    Show answer

    Answer: D. Run it as a dry run, or check the estimate in the query editor

    A dry run returns bytes processed without running the query or charging for it.

  22. Question 22. Which approach MOST reduces the cost of BigQuery queries on a large table filtered by date?

    1. Use SELECT * to avoid missing columns
    2. Copy the table to a new dataset daily
    3. Increase the number of slots in on-demand mode
    4. Partition the table by date and filter on the partition column
    Show answer

    Answer: D. Partition the table by date and filter on the partition column

    Partitioning lets BigQuery scan only relevant partitions. Selecting only needed columns also helps.

  23. Question 23. A VM needs a public IP address that doesn't change when it restarts. What should be done?

    1. Use the ephemeral IP and note it down
    2. Enable Cloud NAT for the VM
    3. Reserve a static external IP address and assign it
    4. Configure the IP in the VM's operating system
    Show answer

    Answer: C. Reserve a static external IP address and assign it

    Ephemeral IPs can change. Static external addresses stay the same until released.

  24. Question 24. An unused reserved static external IP address incurs what?

    1. No charge at all
    2. A charge only in the first month
    3. A charge only if it is IPv6
    4. A charge, because unused static IPs are billed
    Show answer

    Answer: D. A charge, because unused static IPs are billed

    Release static IPs you don't need to avoid charges.

  25. Question 25. Which service provides metrics, dashboards, and alerting for Google Cloud resources?

    1. Cloud Logging
    2. Cloud Trace
    3. Cloud Monitoring
    4. Cloud Profiler
    Show answer

    Answer: C. Cloud Monitoring

    Cloud Monitoring collects metrics and sends alerts. Cloud Logging stores and queries logs.

  26. Question 26. What is needed to collect memory usage and application logs from inside Compute Engine VMs?

    1. The Ops Agent installed on the VMs
    2. A firewall rule allowing port 80
    3. The Compute Engine API disabled
    4. A Cloud Storage bucket for each VM
    Show answer

    Answer: A. The Ops Agent installed on the VMs

    Some metrics, such as memory, come from inside the guest OS, so the Ops Agent is required.

  27. Question 27. An engineer wants an email when a VM's CPU stays above 90% for 10 minutes. What should be created?

    1. A log sink that exports to BigQuery
    2. An uptime check on the VM's port 22
    3. A Cloud Monitoring alerting policy
    4. A budget alert on the billing account
    Show answer

    Answer: C. A Cloud Monitoring alerting policy

    Alerting policies evaluate conditions over time windows and notify channels such as email or Slack.

  28. Question 28. Which Cloud Monitoring feature checks whether a public website responds from locations around the world?

    1. Log-based metrics
    2. Cloud Trace
    3. Uptime checks
    4. Error Reporting
    Show answer

    Answer: C. Uptime checks

    Uptime checks probe HTTP, HTTPS, or TCP endpoints and can trigger alerts.

  29. Question 29. Which tool queries and filters logs from Google Cloud services and applications?

    1. Metrics Explorer in Cloud Monitoring
    2. BigQuery Data Transfer Service
    3. Logs Explorer in Cloud Logging
    4. Cloud Debugger
    Show answer

    Answer: C. Logs Explorer in Cloud Logging

    Logs Explorer uses the Logging query language to search logs.

  30. Question 30. Logs must be kept for 5 years for audit, longer than the default retention. What should be done?

    1. Increase the disk size of the VMs that write the logs
    2. Enable Data Access audit logs in every project
    3. Route the logs with a sink to storage with longer retention
    4. Export the Cloud Monitoring dashboards each month
    Show answer

    Answer: C. Route the logs with a sink to storage with longer retention

    The Log Router can send logs to Cloud Storage, BigQuery, Pub/Sub, or log buckets with custom retention.

  31. Question 31. Where should logs be routed so analysts can run SQL queries on them?

    1. Pub/Sub, through a push subscription
    2. Cloud Storage Archive class
    3. BigQuery, through a log sink
    4. A Compute Engine persistent disk
    Show answer

    Answer: C. BigQuery, through a log sink

    BigQuery sinks make logs queryable with SQL. Log Analytics also offers SQL on log buckets.

  32. Question 32. How can logs from all projects in an organization be collected in one place?

    1. An aggregated sink at the organization or folder level
    2. A separate dashboard in each project
    3. Manually downloading logs from each project
    4. A single VM running a syslog server
    Show answer

    Answer: A. An aggregated sink at the organization or folder level

    Aggregated sinks with includeChildren route logs from all descendant projects.

  33. Question 33. Which log type records administrative actions, such as creating a VM, and is always enabled?

    1. Data Access audit logs
    2. VPC Flow Logs
    3. Firewall Rules Logging
    4. Admin Activity audit logs
    Show answer

    Answer: D. Admin Activity audit logs

    Admin Activity logs are on by default at no charge. Data Access logs must usually be enabled.

  34. Question 34. Which audit logs record when users read data, such as reading objects in a bucket?

    1. Admin Activity audit logs
    2. Data Access audit logs
    3. System Event audit logs
    4. Policy Denied audit logs
    Show answer

    Answer: B. Data Access audit logs

    Data Access logs can be large and are disabled by default for most services, except BigQuery.

  35. Question 35. Which feature records network flows sent and received by VM interfaces for troubleshooting and security analysis?

    1. Admin Activity audit logs
    2. VPC Flow Logs
    3. Cloud Trace spans
    4. Error Reporting
    Show answer

    Answer: B. VPC Flow Logs

    VPC Flow Logs are enabled per subnet and sample traffic flows.

  36. Question 36. Which service groups application crashes and exceptions and alerts on new errors?

    1. Cloud Profiler
    2. Cloud Trace
    3. Error Reporting
    4. Uptime checks
    Show answer

    Answer: C. Error Reporting

    Error Reporting aggregates errors from logs and shows stack traces and counts.

  37. Question 37. Which service shows latency across services for individual requests in a distributed application?

    1. Cloud Profiler
    2. Error Reporting
    3. Logs Explorer
    4. Cloud Trace
    Show answer

    Answer: D. Cloud Trace

    Cloud Trace collects spans to show where time is spent in each request.

  38. Question 38. Which tool continuously analyzes CPU and memory usage of application code in production with low overhead?

    1. Cloud Trace
    2. Cloud Monitoring uptime checks
    3. VPC Flow Logs
    4. Cloud Profiler
    Show answer

    Answer: D. Cloud Profiler

    Profiler identifies which functions consume the most resources.

  39. Question 39. How can a count of specific log entries, such as HTTP 500 errors, be used for alerting?

    1. Export the logs to Cloud Storage
    2. Create a log-based metric and alert on it
    3. Enable Data Access audit logs
    4. Create a firewall rule that logs 500 errors
    Show answer

    Answer: B. Create a log-based metric and alert on it

    Log-based metrics turn log patterns into metrics that alerting policies can use.

  40. Question 40. Which command shows the recent logs for a Cloud Run service from the CLI?

    1. gcloud logging read with a filter on the service name
    2. gcloud run logs download
    3. kubectl logs cloud-run
    4. gcloud compute instances get-serial-port-output
    Show answer

    Answer: A. gcloud logging read with a filter on the service name

    gcloud logging read queries Cloud Logging. Cloud Run also offers gcloud beta run services logs.

  41. Question 41. A VM won't boot and SSH fails. Which tool helps see boot messages?

    1. VPC Flow Logs for the subnet
    2. Cloud Trace for the VM
    3. The project's billing reports
    4. The serial port output or serial console
    Show answer

    Answer: D. The serial port output or serial console

    Serial port output shows boot and kernel messages, and the serial console allows troubleshooting without networking.

  42. Question 42. Which Active Assist recommender suggests changing VMs that are consistently underused?

    1. VM machine type (rightsizing) recommender
    2. IAM role recommender
    3. Firewall insights
    4. Committed use discount recommender only
    Show answer

    Answer: A. VM machine type (rightsizing) recommender

    Rightsizing recommendations are based on observed CPU and memory usage.

  43. Question 43. Which command lists the revisions of a Cloud Run service?

    1. gcloud run services describe revisions
    2. kubectl get revisions --cloud-run
    3. gcloud run deploy --list
    4. gcloud run revisions list --service=my-service
    Show answer

    Answer: D. gcloud run revisions list --service=my-service

    Each deployment creates an immutable revision, which you can list and route traffic to.

  44. Question 44. Which GKE feature automatically upgrades nodes to keep them in sync with the control plane version?

    1. Cluster autoscaler
    2. Node auto-repair
    3. Node auto-upgrade
    4. Workload Identity
    Show answer

    Answer: C. Node auto-upgrade

    Auto-upgrade keeps node versions current. Auto-repair recreates unhealthy nodes.

  45. Question 45. Which command shows the Pods in all namespaces of a GKE cluster?

    1. kubectl get pods --all-namespaces
    2. gcloud container pods list
    3. kubectl describe cluster
    4. kubectl get nodes --pods
    Show answer

    Answer: A. kubectl get pods --all-namespaces

    The -A or --all-namespaces flag lists Pods across namespaces.

  46. Question 46. A Pod keeps restarting. Which command shows the logs from the previous container instance?

    1. kubectl logs POD_NAME --previous
    2. kubectl describe logs POD_NAME
    3. kubectl get events --previous
    4. gcloud container logs POD_NAME
    Show answer

    Answer: A. kubectl logs POD_NAME --previous

    --previous shows logs from the last terminated container, which often reveals the crash cause.

  47. Question 47. Which resource helps keep Compute Engine VMs patched on a schedule?

    1. Snapshot schedules
    2. Instance templates
    3. VM Manager patch deployments
    4. Cloud Scheduler with firewall rules
    Show answer

    Answer: C. VM Manager patch deployments

    VM Manager OS patch management applies patches on a schedule across fleets of VMs.

  48. Question 48. What does the Cloud Storage "gcloud storage rsync" command do?

    1. Moves a bucket to another region
    2. Synchronizes the contents of a local folder and a bucket
    3. Encrypts objects with a customer key
    4. Changes the default storage class of a bucket
    Show answer

    Answer: B. Synchronizes the contents of a local folder and a bucket

    rsync copies only the changes needed to make the destination match the source.

  49. Question 49. How can an engineer copy a Compute Engine disk to another zone?

    1. Change the disk's zone property in the console
    2. Create a snapshot, then create a new disk from it in the target zone
    3. Detach the disk and attach it to a VM in another zone
    4. Use gcloud storage cp on the disk
    Show answer

    Answer: B. Create a snapshot, then create a new disk from it in the target zone

    Snapshots are global resources, so disks can be restored from them in any zone.

  50. Question 50. Which log shows why a firewall rule allowed or denied a connection?

    1. Admin Activity audit logs
    2. Error Reporting
    3. Cloud Profiler
    4. Firewall Rules Logging
    Show answer

    Answer: D. Firewall Rules Logging

    Enabling logging on a firewall rule records the connections it matches.

  51. Question 51. A dashboard should show metrics from several services in one view. What should be used?

    1. A Cloud Storage lifecycle report
    2. A custom dashboard in Cloud Monitoring
    3. A billing export to BigQuery
    4. Logs Explorer saved queries
    Show answer

    Answer: B. A custom dashboard in Cloud Monitoring

    Custom dashboards combine charts from many metrics and resources.

  52. Question 52. How can a Cloud SQL instance's maintenance updates be kept outside business hours?

    1. Configure a maintenance window for a preferred day and hour
    2. Disable automatic updates entirely
    3. Create a read replica in another region
    4. Enable point-in-time recovery
    Show answer

    Answer: A. Configure a maintenance window for a preferred day and hour

    Maintenance windows set when Google applies updates that require a restart.

  53. Question 53. Which command deletes a GKE cluster?

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

    Answer: C. gcloud container clusters delete my-cluster --region=us-central1

    Deleting the cluster removes its control plane and node pools.

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