Google

Associate Cloud Engineer Free Practice Questions — Page 11

Question 100

You want to permanently delete a Pub/Sub topic managed by Config Connector in your Google Cloud project. What should you do?

A. Use kubectl to create the label deleted-by-cnrm and to change its value to true for the topic resource.
B. Use kubectl to delete the topic resource.
C. Use gcloud CLI to delete the topic.
D. Use gcloud CLI to update the topic label managed-by-cnrm to false.
Show Answer
Correct Answer: B
Explanation:
When a Pub/Sub topic is managed by Config Connector, Kubernetes is the source of truth. To permanently delete the underlying Google Cloud resource, you must delete the corresponding Kubernetes custom resource using kubectl. Config Connector will then reconcile the deletion and remove the Pub/Sub topic from the project. Using gcloud directly or modifying labels bypasses Config Connector and is not the correct approach.

Question 101

You used the gcloud container clusters command to create two Google Cloud Kubernetes (GKE) clusters: prod-cluster and dev-cluster. • prod-cluster is a standard cluster. • dev-cluster is an auto-pilot cluster. When you run the kubectl get nodes command, you only see the nodes from prod-cluster. Which commands should you run to check the node status for dev-cluster?

A. gcloud container clusters get-credentials dev-cluster kubectl get nodes
B. gcloud container clusters update -generate-password dev-cluster kubectl get nodes
C. kubectl config set-context dev-cluster kubectl cluster-info
D. kubectl config set-credentials dev-cluster kubectl cluster-info
Show Answer
Correct Answer: A
Explanation:
kubectl is currently configured to point at prod-cluster, so it only shows prod nodes. To view resources in dev-cluster, you must update your kubeconfig and switch context to that cluster. The gcloud container clusters get-credentials dev-cluster command fetches the cluster’s endpoint and credentials and sets the kubectl context to dev-cluster. After that, running kubectl get nodes will show the node status for dev-cluster (even though it is Autopilot-managed).

Question 102

Your managed instance group raised an alert stating that new instance creation has failed to create new instances. You need to solve the instance creation problem. What should you do?

A. Create an instance template that contains valid syntax which will be used by the instance group. Delete any persistent disks with the same name as instance names.
B. Create an instance template that contains valid syntax that will be used by the instance group. Verify that the instance name and persistent disk name values are not the same in the template.
C. Verify that the instance template being used by the instance group contains valid syntax. Delete any persistent disks with the same name as instance names. Set the disks.autoDelete property to true in the instance template.
D. Delete the current instance template and replace it with a new instance template. Verify that the instance name and persistent disk name values are not the same in the template. Set the disks.autoDelete property to true in the instance template.
Show Answer
Correct Answer: A
Explanation:
Managed instance groups create VMs from an instance template, and instance templates are immutable. Instance creation failures commonly occur when a persistent disk with the same name as the instance already exists, causing a name conflict. The correct remediation is to create a new instance template with valid syntax for the MIG and delete any conflicting persistent disks. Options that suggest modifying or deleting an in-use template are invalid.

Question 103

You are planning to migrate the following on-premises data management solutions to Google Cloud: • One MySQL cluster for your main database • Apache Kafka for your event streaming platform • One Cloud SQL for PostgreSQL database for your analytical and reporting needs You want to implement Google-recommended solutions for the migration. You need to ensure that the new solutions provide global scalability and require minimal operational and infrastructure management. What should you do?

A. Migrate from MySQL to Cloud SQL, from Kafka to Pub/Sub, and from Cloud SQL for PostgreSQL to BigQuery.
B. Migrate from MySQL to Cloud Spanner, from Kafka to Pub/Sub, and from Cloud SQL for PostgreSQL to BigQuery.
C. Migrate from MySQL to Cloud Spanner, from Kafka to Memorystore, and from Cloud SQL for PostgreSQL to Cloud SQL.
D. Migrate from MySQL to Cloud SQL, from Kafka to Memorystore, and from Cloud SQL for PostgreSQL to Cloud SQL.
Show Answer
Correct Answer: B
Explanation:
The requirements emphasize global scalability and minimal operational management using Google‑recommended services. Cloud Spanner provides globally distributed, horizontally scalable relational databases, unlike Cloud SQL. Pub/Sub is the managed, scalable replacement for Kafka. BigQuery is the serverless, highly scalable analytics and reporting platform, making it more appropriate than Cloud SQL for PostgreSQL in this use case.

Question 104

You are migrating a business critical application from your local data center into Google Cloud. As part of your high-availability strategy, you want to ensure that any data used by the application will be immediately available if a zonal failure occurs. What should you do?

A. Store the application data on a zonal persistent disk. Create a snapshot schedule for the disk. If an outage occurs, create a new disk from the most recent snapshot and attach it to a new VM in another zone.
B. Store the application data on a zonal persistent disk. If an outage occurs, create an instance in another zone with this disk attached.
C. Store the application data on a regional persistent disk. Create a snapshot schedule for the disk. If an outage occurs, create a new disk from the most recent snapshot and attach it to a new VM in another zone.
D. Store the application data on a regional persistent disk. If an outage occurs, create an instance in another zone with this disk attached.
Show Answer
Correct Answer: D
Explanation:
To ensure data is immediately available after a zonal failure, you must avoid any restore or copy operation. Regional Persistent Disks synchronously replicate data across two zones in the same region. If one zone fails, the same regional disk can be force-attached to a VM in the surviving zone with no data loss and minimal recovery time. Snapshots are for backup and disaster recovery, not immediate high availability, and zonal disks cannot survive a zonal outage.

Question 105

Your continuous integration and delivery (CI/CD) server can’t execute Google Cloud actions in a specific project because of permission issues. You need to validate whether the used service account has the appropriate roles in the specific project. What should you do?

A. Open the Google Cloud console, and check the Identity and Access Management (IAM) roles assigned to the service account at the project or inherited from the folder or organization levels.
B. Open the Google Cloud console, and check the organization policies.
C. Open the Google Cloud console, and run a query to determine which resources this service account can access.
D. Open the Google Cloud console, and run a query of the audit logs to find permission denied errors for this service account.
Show Answer
Correct Answer: A
Explanation:
To validate whether a service account has the appropriate permissions in a specific Google Cloud project, you must inspect its IAM role bindings. The Google Cloud Console IAM page shows which roles are directly assigned at the project level and which are inherited from the folder or organization. Organization policies (B) restrict behavior but do not grant permissions, audit logs (D) help troubleshoot errors but do not directly validate roles, and resource access queries (C) are indirect and less practical than checking IAM bindings.

Question 106

Your company runs one batch process in an on-premises server that takes around 30 hours to complete. The task runs monthly, can be performed offline, and must be restarted if interrupted. You want to migrate this workload to the cloud while minimizing cost. What should you do?

A. Create an Instance Template with Spot VMs On. Create a Managed Instance Group from the template and adjust Target CPU Utilization. Migrate the workload.
B. Migrate the workload to a Compute Engine VM. Start and stop the instance as needed.
C. Migrate the workload to a Google Kubernetes Engine cluster with Spot nodes.
D. Migrate the workload to a Compute Engine Spot VM.
Show Answer
Correct Answer: B
Explanation:
The batch job runs for ~30 hours, must restart from the beginning if interrupted, and runs only once per month. Spot VMs (options A, C, and D) can be preempted at any time, which would force a restart and risk never completing the job, making them unsuitable for a non–fault-tolerant workload. A Managed Instance Group and GKE add unnecessary complexity for a single batch process. Using a regular Compute Engine VM and starting it only when the job runs minimizes cost while ensuring uninterrupted execution and predictable completion.

Question 107

You are working for a hospital that stores its medical images in an on-premises data room. The hospital wants to use Cloud Storage for archival storage of these images. The hospital wants an automated process to upload any new medical images to Cloud Storage. You need to design and implement a solution. What should you do?

A. Create a Pub/Sub topic, and enable a Cloud Storage trigger for the Pub/Sub topic. Create an application that sends all medical images to the Pub/Sub topic.
B. Create a script that uses the gcloud storage command to synchronize the on-premises storage with Cloud Storage, Schedule the script as a cron job.
C. Create a Pub/Sub topic, and create a Cloud Function connected to the topic that writes data to Cloud Storage. Create an application that sends all medical images to the Pub/Sub topic.
D. In the Google Cloud console, go to Cloud Storage. Upload the relevant images to the appropriate bucket.
Show Answer
Correct Answer: B
Explanation:
The requirement is an automated way to upload new on‑premises image files to Cloud Storage for archival. A scheduled synchronization from the on‑premises system directly to Cloud Storage is the simplest and most appropriate design. Using a script (for example with gsutil rsync or the gcloud storage CLI) and running it via cron reliably uploads new or changed files without manual intervention. Pub/Sub–based options are unnecessary and inappropriate for bulk file transfer from on‑premises storage, and manual console uploads do not meet the automation requirement.

Question 108

Your company requires all developers to have the same permissions, regardless of the Google Cloud project they are working on. Your company’s security policy also restricts developer permissions to Compute Engine, Cloud Functions, and Cloud SQL. You want to implement the security policy with minimal effort. What should you do?

A. • Create a custom role with Compute Engine, Cloud Functions, and Cloud SQL permissions in one project within the Google Cloud organization. • Copy the role across all projects created within the organization with the gcloud iam roles copy command. • Assign the role to developers in those projects.
B. • Add all developers to a Google group in Google Groups for Workspace. • Assign the predefined role of Compute Admin to the Google group at the Google Cloud organization level.
C. • Add all developers to a Google group in Cloud Identity. • Assign predefined roles for Compute Engine, Cloud Functions, and Cloud SQL permissions to the Google group for each project in the Google Cloud organization.
D. • Add all developers to a Google group in Cloud Identity. • Create a custom role with Compute Engine, Cloud Functions, and Cloud SQL permissions at the Google Cloud organization level. • Assign the custom role to the Google group.
Show Answer
Correct Answer: D
Explanation:
The requirement is identical permissions across all projects, limited to specific services, with minimal administrative effort. Creating a custom role scoped at the organization level enforces least privilege across Compute Engine, Cloud Functions, and Cloud SQL. Assigning that role to a Cloud Identity group at the organization level ensures consistent access inherited by all projects and centralized management. Other options either use overly broad predefined roles, require per-project assignments, or add unnecessary operational overhead.

Question 109

You are building a data lake on Google Cloud for your Internet of Things (IoT) application. The IoT application has millions of sensors that are constantly streaming structured and unstructured data to your backend in the cloud. You want to build a highly available and resilient architecture based on Google-recommended practices. What should you do?

A. Stream data to Pub/Sub, and use Dataflow to send data to Cloud Storage.
B. Stream data to Pub/Sub, and use Storage Transfer Service to send data to BigQuery.
C. Stream data to Dataflow, and use Dataprep by Trifacta to send data to Bigtable.
D. Stream data to Dataflow, and use Storage Transfer Service to send data to BigQuery.
Show Answer
Correct Answer: A
Explanation:
A highly available, resilient IoT data lake on Google Cloud should decouple ingestion, processing, and storage. Pub/Sub is the recommended service for ingesting high‑volume streaming data from millions of sensors with built‑in scalability and durability. Dataflow natively integrates with Pub/Sub for real‑time stream processing and provides fully managed, fault‑tolerant pipelines. Cloud Storage is the recommended foundation for a data lake because it supports massive scale, high durability, and both structured and unstructured data. The other options misuse services (e.g., Storage Transfer Service is not for streaming ingestion, and Dataflow is not a streaming ingestion endpoint by itself).

$19

Get all 314 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.