Google

Associate Cloud Engineer Free Practice Questions — Page 3

Question 21

You are migrating your company’s on-premises compute resources to Google Cloud. You need to deploy batch processing jobs that run every night. The jobs require significant CPU and memory for several hours but can tolerate interruptions. You must ensure that the deployment is cost-effective. What should you do?

A. Use the M1 machine series on Compute Engine.
B. Containerize the batch processing jobs and deploy them on Compute Engine.
C. Use Spot VMs on Compute Engine.
D. Use custom machine types on Compute Engine.
Show Answer
Correct Answer: C
Explanation:
Spot VMs are designed for fault-tolerant, interruptible workloads such as batch processing and offer substantial cost savings compared to regular VMs. Since the jobs can tolerate interruptions and run on a nightly schedule, Spot VMs are the most cost-effective choice. M1 instances target large-memory workloads, containerizing alone does not reduce infrastructure cost, and custom machine types optimize sizing but generally do not provide the savings of Spot VMs for interruptible workloads.

Question 22

Your company has many legacy third-party applications that rely on a shared NFS server for file sharing between these workloads. You want to modernize the NFS server by using a Google Cloud managed service. You need to select the solution that requires the least amount of change to the application. What should you do?

A. Create a Compute Engine instance and configure an NFS server on the instance. Point all NFS mounts to the Compute Engine instance.
B. Deploy a Filestore instance. Replace all NFS mounts with a Filestore mount.
C. Configure Firestore. Configure all applications to use Firestore instead of the NFS server.
D. Create a Cloud Storage bucket. Configure all applications to use Cloud Storage client libraries instead of the NFS server.
Show Answer
Correct Answer: B
Explanation:
Google Cloud Filestore is the managed NFS file storage service. It provides standard NFS mounts, allowing legacy applications that already use NFS to migrate with minimal or no application changes beyond updating the mount target. The other options either require managing your own NFS server or rewriting applications to use different storage APIs.

Question 23

Your company has a rapidly growing social media platform and a user base primarily located in North America. Due to increasing demand, your current on-premises PostgreSQL database, hosted in your United States headquarters data center, no longer meets your needs. You need to identify a cloud-based database solution that offers automatic scaling, multi-region support for future expansion, and maintains low latency. What should you do?

A. Use BigQuery.
B. Use Spanner.
C. Use Cloud SQL for PostgreSQL.
D. Use Bigtable.
Show Answer
Correct Answer: B
Explanation:
Cloud Spanner is a globally distributed relational database that provides automatic scaling, strong consistency, and multi-region deployments with low-latency access, making it suitable for a rapidly growing application with future geographic expansion. BigQuery is an analytics warehouse, Cloud SQL does not provide Spanner's global horizontal scaling and multi-region architecture, and Bigtable is a NoSQL wide-column database rather than a PostgreSQL-like relational solution.

Question 24

You have an application that is currently processing transactions by using a group of managed VM instances. You need to migrate the application so that it is serverless and scalable. You want to implement an asynchronous transaction processing system, while minimizing management overhead. What should you do?

A. Install Kafka on VM instances to acknowledge incoming transactions. Use Cloud Run to process transactions.
B. Use Pub/Sub to acknowledge incoming transactions. Use VM instances to process transactions.
C. Use Pub/Sub to acknowledge incoming transactions. Use Cloud Run to process transactions.
D. Install Kafka on VM instances to acknowledge incoming transactions. Use VM instances to process transactions.
Show Answer
Correct Answer: C
Explanation:
For a serverless, scalable, asynchronous transaction processing system with minimal management overhead, use Pub/Sub as the managed messaging service to acknowledge and queue incoming transactions, and Cloud Run as the serverless compute platform to process them. This avoids managing Kafka clusters or VM instances while providing automatic scaling.

Question 25

You are deploying an application to Google Kubernetes Engine (GKE) that needs to call an external third-party API. You need to provide the external API vendor with a list of IP addresses for their firewall to allow traffic from your application. You want to follow Google-recommended practices and avoid any risk of interrupting traffic to the API due to IP address changes. What should you do?

A. Configure your GKE cluster with one node, and set the node to have a static external IP address. Ensure that the GKE cluster autoscaler is off. Send the external IP address of the node to the vendor to be added to the allowlist.
B. Configure your GKE cluster with private nodes. Configure a Cloud NAT instance with static IP addresses. Provide these IP addresses to the vendor to be added to the allowlist.
C. Configure your GKE cluster with private nodes. Configure a Cloud NAT instance with dynamic IP addresses. Provide these IP addresses to the vendor to be added to the allowlist.
D. Configure your GKE cluster with public nodes. Write a Cloud Function that pulls the public IP addresses of each node in the cluster, Trigger the function to run every day with Cloud Scheduler. Send the list to the vendor by email every day.
Show Answer
Correct Answer: B
Explanation:
Using private GKE nodes with Cloud NAT configured with reserved static external IP addresses provides stable egress IPs for outbound traffic. Those static NAT IPs can be shared with the third-party vendor for firewall allowlisting and will not change during normal operations. The other options either rely on node public IPs that are operationally fragile or use dynamic NAT addresses that can change.

Question 26

You recently discovered an issue with your rolling update in Google Kubernetes Engine (GKE). You now need to roll back a rolling update. What should you do?

A. Delete the deployment.
B. Use the kubectl rollout restart command to revert the deployment.
C. Use the kubectl rollout undo command.
D. Manually scale down the new Pods and scale up the old Pods.
Show Answer
Correct Answer: C
Explanation:
The standard Kubernetes command to roll back a Deployment to a previous revision after a problematic rolling update is `kubectl rollout undo`. Deleting the deployment removes it rather than rolling it back, `kubectl rollout restart` triggers a new rollout instead of reverting, and manually scaling pods is not the recommended rollback mechanism.

Question 27

You are implementing a company-wide standard to control SSH access for your Google Cloud projects. You want to simplify SSH access management to your Compute Engine instances while maintaining audit compliance and eliminating as many manual steps as possible. What should you do?

A. Configure a service account to add SSH keys for all VMs.
B. Configure metadata SSH keys to manage sudo access to instances.
C. Enable OS Login by using an organization policy for each Google Cloud project.
D. Enable OS Login with two-factor authentication for the domain.
Show Answer
Correct Answer: D
Explanation:
OS Login centralizes SSH access management using IAM identities, eliminates manual SSH key management, and provides audit logging. Enabling OS Login with two-factor authentication strengthens authentication and supports compliance requirements. For a company-wide standard, OS Login is the recommended approach; 2FA best satisfies the audit/compliance requirement among the options.

Question 28

You are migrating your on-premises workload to Google Cloud. Your company is implementing its Cloud Billing configuration and requires access to a granular breakdown of its Google Cloud costs. You need to ensure that the Cloud Billing datasets are available in BigQuery so you can conduct a detailed analysis of costs. What should you do?

A. Enable Cloud Billing data export to BigQuery when you create a Cloud Billing account.
B. Enable Cloud Billing on the project, and link a Cloud Billing account. Then view the billing data table in the BigQuery dataset.
C. Create a Cloud Billing account. Enable the BigQuery Data Transfer Service API to export pricing data.
D. Enable the BigQuery API, and ensure that the BigQuery User IAM role is selected. Change the BigQuery dataset to select a data location.
Show Answer
Correct Answer: A
Explanation:
To analyze Google Cloud costs in detail with BigQuery, you must enable Cloud Billing data export to a BigQuery dataset from the Cloud Billing account. Merely linking billing to a project or enabling APIs does not automatically export billing data. The BigQuery Data Transfer Service is for pricing data, not Cloud Billing cost export.

Question 29

Your company is modernizing its applications and refactoring them to containerized microservices. You need to deploy the infrastructure on Google Cloud so that teams can deploy their applications. The applications cannot be exposed publicly. You want to minimize management and operational overhead. What should you do?

A. Provision a Google Kubernetes Engine (GKE) Autopilot cluster.
B. Provision a fleet of Compute Engine instances and install Kubernetes.
C. Provision a Standard regional Google Kubernetes Engine (GKE) cluster.
D. Provision a Standard zonal Google Kubernetes Engine (GKE) cluster.
Show Answer
Correct Answer: A
Explanation:
GKE Autopilot provides the lowest operational overhead because Google manages the cluster infrastructure, node provisioning, scaling, upgrades, and repairs. The requirement that applications cannot be exposed publicly does not require a Standard cluster; Autopilot supports private clusters and internal-only services. Managing Compute Engine instances yourself has the highest overhead, and Standard GKE clusters require more cluster administration than Autopilot.

Question 30

You are managing a fleet of Compute Engine Linux instances in a Google Cloud project. Your company's engineering team requires SSH access to all instances to perform routine maintenance tasks. You need to manage the SSH access for the engineering team, and you want to minimize operational overhead when engineers join or leave the team. What should you do?

A. Create a single SSH key pair to be shared by all engineering team members. Add the public SSH key to project metadata.
B. Create an SSH key pair for each engineer on the team, and add the public SSH key to the metadata of the relevant instances.
C. Create a Google Group for all engineering team members, and grant them the Compute Viewer IAM role. Manage group membership when engineers join or leave the team.
D. Create a Google Group for all engineering team members, and set up OS Login for this group on the project. Manage group membership when engineers join or leave the team.
Show Answer
Correct Answer: D
Explanation:
OS Login centralizes SSH authorization using IAM instead of distributing SSH keys. Grant the appropriate OS Login role to a Google Group and manage membership in the group so access is added or removed automatically with minimal operational overhead. Sharing a single key is insecure, per-instance metadata does not scale, and the Compute Viewer role alone does not grant SSH access.

$19

Get all 323 questions with detailed answers and explanations

  • Instant download HTML + PDF delivered the moment payment clears.
  • Secure Stripe checkout we never see or store your card details.
  • 7-day refund if files are defective see our refund policy.