Google

Associate Cloud Engineer Free Practice Questions — Page 6

Question 52

You use Cloud Logging to capture application logs. You now need to use SQL to analyze the application logs in Cloud Logging, and you want to follow Google-recommended practices. What should you do?

A. Develop SQL queries by using Gemini for Google Cloud.
B. Enable Log Analytics for the log bucket and create a linked dataset in BigQuery.
C. Create a schema for the storage bucket and run SQL queries for the data in the bucket.
D. Export logs to a storage bucket and create an external view in BigQuery.
Show Answer
Correct Answer: B
Explanation:
Enable Log Analytics on the Cloud Logging log bucket and create a linked BigQuery dataset. This is the Google-recommended approach for analyzing Cloud Logging data with standard SQL without exporting logs, providing native integration and simplified management.

Question 53

Your preview application, deployed on a single-zone Google Kubernetes Engine (GKE) cluster in us-central1, has gained popularity. You are now ready to make the application generally available. You need to deploy the application to production while ensuring high availability and resilience. You also want to follow Google-recommended practices. What should you do?

A. Use the gcloud container clusters create command with the options --enable-multi-networking and --enable-autoscaling to create an autoscaling zonal cluster and deploy the application to it.
B. Use the gcloud container clusters create-auto command to create an autopilot cluster and deploy the application to it.
C. Use the gcloud container clusters update command with the option --region us-central1 to update the cluster and deploy the application to it.
D. Use the gcloud container clusters update command with the option --node-locations us-central1-a,us-central1-b to update the cluster and deploy the application to the nodes.
Show Answer
Correct Answer: B
Explanation:
For production with high availability and resilience following Google-recommended practices, create a new GKE Autopilot cluster. Autopilot clusters are regional by default, distributing control plane and workloads across multiple zones in the region while providing managed operations. Option A remains zonal. Option C cannot convert a zonal cluster into a regional cluster by updating the region. Option D creates a multi-zonal node layout but leaves the control plane in a single zone, which is less resilient than a regional cluster.

Question 54

You have a VM instance running in a VPC with single-stack subnets. You need to ensure that the VM instance has a fixed IP address so that other services hosted in the same VPC can communicate with the VM. You want to follow Google-recommended practices while minimizing cost. What should you do?

A. Promote the existing IP address of the VM to become a static external IP address.
B. Promote the existing IP address of the VM to become a static internal IP address.
C. Reserve a new static external IPv6 address and assign the new IP address to the VM.
D. Reserve a new static external IP address and assign the new IP address to the VM.
Show Answer
Correct Answer: B
Explanation:
For communication within the same VPC, the VM should use a static internal IP address rather than an external IP. In a single-stack VPC subnet, an internal IPv4 address is used for intra-VPC connectivity. Promoting the VM's existing ephemeral internal IP to a static internal IP preserves the current address, avoids reconfiguration, follows Google Cloud best practices, and minimizes cost by not allocating an unnecessary external IP.

Question 55

You need to deploy a third-party software application onto a single Compute Engine VM instance. The application requires the highest speed read and write disk access for the internal database. You need to ensure the instance will recover on failure. What should you do?

A. Create an instance template. Set the disk type to be an SSD Persistent Disk. Launch the instance template as part of a stateful managed instance group.
B. Create an instance template. Set the disk type to be an SSD Persistent Disk. Launch the instance template as part of a stateless managed instance group.
C. Create an instance template. Set the disk type to be Hyperdisk Extreme. Launch the instance template as part of a stateful managed instance group.
D. Create an instance template. Set the disk type to be Hyperdisk Extreme. Launch the instance template as part of a stateless managed instance group.
Show Answer
Correct Answer: C
Explanation:
Hyperdisk Extreme provides the highest read/write performance, dedicated IOPS and throughput, and is intended for demanding database workloads. To ensure a single VM recovers while preserving its attached disk and application state, deploy it in a stateful managed instance group rather than a stateless one.

Question 56

You are deploying an application on Google Cloud that requires a relational database for storage. To satisfy your company’s security policies, your application must connect to your database through an encrypted and authenticated connection that requires minimal management and integrates with Identity and Access Management (IAM). What should you do?

A. Deploy a Cloud SQL database with the SSL mode set to encrypted only, configure SSL/TLS client certificates, and configure a database user and password.
B. Deploy a Cloud SQL database with the SSL mode set to encrypted only, configure SSL/TLS client certificates, and configure IAM database authentication.
C. Deploy a Cloud SQL database and configure IAM database authentication. Access the database through the Cloud SQL Auth Proxy.
D. Deploy a Cloud SQL database and configure a database user and password. Access the database through the Cloud SQL Auth Proxy.
Show Answer
Correct Answer: C
Explanation:
The Cloud SQL Auth Proxy automatically provides encrypted connections and uses IAM to authorize access to Cloud SQL, minimizing connection security management. Combined with IAM database authentication, users authenticate with IAM identities instead of database passwords, satisfying the requirement for encrypted, authenticated connections with IAM integration and minimal operational overhead.

Question 57

Your team is building a website that handles votes from a large user population. The incoming votes will arrive at various rates. You want to optimize the storage and processing of the votes. What should you do?

A. Save the incoming votes to Firestore. Use Cloud Scheduler to trigger a Cloud Functions instance to periodically process the votes.
B. Use a dedicated instance to process the incoming votes. Send the votes directly to this instance.
C. Save the incoming votes to a JSON file on Cloud Storage. Process the votes in a batch at the end of the day.
D. Save the incoming votes to Pub/Sub. Use the Pub/Sub topic to trigger a Cloud Functions instance to process the votes.
Show Answer
Correct Answer: D
Explanation:
Pub/Sub is designed to absorb variable-rate incoming events and decouple ingestion from processing. A Cloud Function triggered by a Pub/Sub topic scales automatically to process messages as they arrive, making it well suited for handling bursts of votes efficiently. The other options either rely on polling, a single dedicated instance, or delayed batch processing, which are less scalable or increase latency.

Question 58

You want to deploy a new containerized application into Google Cloud by using a Kubernetes manifest. You want to have full control over the Kubernetes deployment, and at the same time, you want to minimize configuring infrastructure. What should you do?

A. Deploy the application on GKE Autopilot.
B. Deploy the application on Cloud Run.
C. Deploy the application on GKE Standard.
D. Deploy the application on Cloud Functions.
Show Answer
Correct Answer: A
Explanation:
GKE Autopilot is designed for running Kubernetes workloads with minimal infrastructure management while still allowing you to deploy and manage applications using standard Kubernetes manifests. GKE Standard provides more control over the underlying cluster and nodes but requires significantly more infrastructure configuration. Cloud Run and Cloud Functions do not provide full Kubernetes deployment control via Kubernetes manifests.

Question 59

You need to deploy a single stateless web application with a web interface and multiple endpoints. For security reasons, the web application must be reachable from an internal IP address from your company's private VPC and on-premises network. You also need to update the web application multiple times per day with minimal effort and want to manage a minimal amount of cloud infrastructure. What should you do?

A. Deploy the web application on Google Kubernetes Engine standard edition with an internal ingress.
B. Deploy the web application on Cloud Run with Private Google Access configured.
C. Deploy the web application on Cloud Run with Private Service Connect configured.
D. Deploy the web application to GKE Autopilot with Private Google Access configured.
Show Answer
Correct Answer: C
Explanation:
Cloud Run is the best fit for a single stateless web application that is updated frequently and requires minimal infrastructure management. To make the service privately reachable from a VPC and from an on-premises network, use Private Service Connect, which exposes Cloud Run through a private endpoint. Private Google Access allows workloads in a VPC to reach Google APIs and services but does not provide private inbound connectivity to a Cloud Run service from your VPC or on-premises network. GKE options require more infrastructure management than Cloud Run.

Question 60

Your web application is hosted on Cloud Run and needs to query a Cloud SQL database. Every morning during a traffic spike, you notice API quota errors in Cloud SQL logs. The project has already reached the maximum API quota. You want to make a configuration change to mitigate the issue. What should you do?

A. Modify the minimum number of Cloud Run instances.
B. Use traffic splitting.
C. Modify the maximum number of Cloud Run instances.
D. Set a minimum concurrent requests environment variable for the application.
Show Answer
Correct Answer: A
Explanation:
Setting a minimum number of Cloud Run instances keeps warm instances available, reducing cold starts and the burst of Cloud SQL Admin API operations (such as connector/instance metadata lookups and connection initialization) that can occur when many new instances start simultaneously during the morning traffic spike. Since the project has already reached the API quota and the goal is a configuration change to mitigate the issue, increasing the minimum instances is the best fit. Limiting maximum instances would reduce scaling capacity and is not the standard mitigation for cold-start-driven API bursts. Traffic splitting is unrelated, and there is no 'minimum concurrent requests' environment variable for Cloud Run.

Question 61

Your team has developed a stateless application which requires it to be run directly on virtual machines. The application is expected to receive a fluctuating amount of traffic and needs to scale automatically. You need to deploy the application. What should you do?

A. Deploy the application on a managed instance group and configure autoscaling.
B. Deploy the application on a Kubernetes Engine cluster and configure node pool autoscaling.
C. Deploy the application on Cloud Functions and configure the maximum number instances.
D. Deploy the application on Cloud Run and configure autoscaling.
Show Answer
Correct Answer: A
Explanation:
The application must run directly on virtual machines, is stateless, and needs automatic scaling with fluctuating traffic. Managed Instance Groups (MIGs) are the Google Cloud service designed for identical VM fleets, providing autoscaling, autohealing, and integration with load balancing. Kubernetes Engine, Cloud Run, and Cloud Functions abstract away direct VM deployment and do not satisfy the requirement to run the application directly on virtual machines.

$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.