Professional Cloud Developer Free Practice Questions — Page 2
Question 11
You are a developer at a large corporation. You manage three GKE clusters. Your team’s developers need to switch from one cluster to another regularly on the same workstation. You want to configure individual access to these multiple clusters securely while following Google-recommended practices. What should you do?
A. Ask the developers to use Cloud Shell and run the gcloud container clusters get-credentials command to switch to another cluster.
B. Ask the developers to open three terminals on their workstation and use the kubectl config set command to configure access to each cluster.
C. Ask the developers to install the gcloud CLI on their workstation and run the gcloud container clusters get-credentials command to switch to another cluster.
D. In a text file, define the clusters, users, and contexts. Email the file to the developers and ask them to use the kubectl config set command to add cluster, user, and context details to the file.
Show Answer
Correct Answer: C
Explanation: Google-recommended practice is to use the gcloud CLI with IAM-based authentication to manage access to GKE clusters. Installing gcloud locally and running `gcloud container clusters get-credentials` securely updates the kubeconfig with proper contexts, allowing developers to switch clusters easily on their own workstation. Cloud Shell is unnecessary if developers have local environments, manually editing kubeconfig is error-prone and insecure, and managing multiple terminals is not required.
Question 12
You are a developer that works for a local concert venue. Customers use your company’s website to purchase tickets for events. You need to provide customers with immediate confirmation when a selected seat has been reserved. How should you design the ticket ordering process?
A. Upload the seat reservation to a Cloud Storage bucket, which triggers an event to the backend service that processes the seat reservation.
B. Submit the seat reservation in an HTTP POST request to an Application Load Balancer. Configure the Application Load Balancer to distribute the request to the backend service that processes the seat reservation.
C. Add the seat reservation to a Cloud Tasks queue, which triggers Workflows to process the seat reservation.
D. Publish the seat reservation to a Pub/Sub topic. Configure the backend service to subscribe to the topic to process the seat reservation.
Show Answer
Correct Answer: B
Explanation: Immediate confirmation requires a synchronous request–response interaction. Sending the seat reservation via an HTTP POST to an Application Load Balancer allows the backend service to process the reservation in real time and return success or failure immediately. The other options are asynchronous, event-driven approaches that do not guarantee immediate confirmation to the customer.
Question 13
You are building an application that will store frequently accessed data in a Memorystore for Redis Cluster instance. You would like to make the application resilient to network issues. You need to ensure that the application handles client disconnections from a Redis instance gracefully to minimize disruption and ensure stability of the application. What should you do?
A. Immediately terminate the application instance upon detecting a Redis disconnection to force a restart, and wait for clients to reconnect to the cache as soon as the application becomes available.
B. Configure the Redis client to reconnect after a fixed delay of 60 seconds.
C. Use Memorystore’s automatic failover mechanisms to make the Redis cache available in a secondary zone.
D. Implement exponential backoff with a jitter when reconnecting after a disconnection. Configure client-side caching to serve data during brief outages.
Show Answer
Correct Answer: D
Explanation: Exponential backoff with jitter is a best practice for handling transient network failures because it prevents thundering-herd reconnection storms and allows the system to recover smoothly. Serving data from client-side caching during brief outages further improves application resilience and user experience. The other options either increase disruption, are too rigid, or address infrastructure availability rather than client-side disconnection handling.
Question 14
You have a Cloud Run service that connects to a Cloud SQL Enterprise edition database instance using the default Cloud SQL connection. You need to enable more than 100 connections per Cloud Run instance. What should you do?
A. Increase the queries per minute quota limit of the Cloud SQL Admin API.
B. Increase the max_connection flag in Cloud SQL for PostgresSQL.
C. Upgrade to Cloud SQL Enterprise Plus edition.
D. Use Cloud SQL Auth Proxy in a sidecar.
Show Answer
Correct Answer: C
Explanation: Cloud Run’s built‑in (default) Cloud SQL connection uses the Cloud SQL connector, which enforces a hard limit of 100 concurrent connections per Cloud Run instance. Using a sidecar with the Cloud SQL Auth Proxy does not remove this limit. To exceed 100 connections per Cloud Run instance, the Cloud SQL instance must be upgraded to Enterprise Plus edition, which supports higher connection limits with Cloud Run.
Question 15
You are deploying new workloads on a GKE Autopilot mode cluster. You need to ensure that the Pods are scheduled on nodes that use Arm architecture CPUs. The cluster currently has no Arm-based CPUs. You want to minimize cluster operations. How should you ensure that the workloads on the GKE cluster will use Arm-based CPU nodes?
A. Apply Pod tolerations to request GKE to avoid scheduling Pods on nodes that do not have Arm-based CPUs.
B. Apply node taints on node pools to tell GKE to only schedule your workloads on Arm-based CPU nodes.
C. Deploy a new cluster in GKE Standard mode, and set up a node pool with Arm-based CPU nodes. Use nodeSelector in your manifest to ensure that Pods are scheduled in this node pool.
D. Request the Scale-out compute class and the arm64 architecture in your manifest.
Show Answer
Correct Answer: D
Explanation: In GKE Autopilot you do not manage nodes or node pools directly. To minimize cluster operations and have Google provision the appropriate hardware, you must express the requirement in the Pod spec. By requesting the Scale-out compute class and specifying the arm64 architecture, Autopilot will automatically create and use Arm-based nodes for the workload. Other options rely on node-level management that is not applicable or optimal in Autopilot mode.
Question 16
You work for an ecommerce company. You are developing a new application with the following requirements:
• The application must have access to the most up-to-date data at all times.
• Due to company policy, data older than 30 days must be automatically deleted.
You need to determine which service should host the database, and how to configure the data deletion. You want to use the most efficient solution. What should you do?
A. Configure Spanner to host the database. Use Data Catalog to delete data older than 30 days.
B. Configure Spanner to host the database. Create a time-to-live policy that deletes data older than 30 days.
C. Configure Bigtable to host the database. Create a time-to-live policy that deletes data older than 30 days.
D. Configure Bigtable to host the database. Create a garbage collection policy in Bigtable that deletes data older than 30 days.
Show Answer
Correct Answer: B
Explanation: An ecommerce application typically requires strongly consistent, transactional (ACID) access to the most up-to-date data, which is best provided by Cloud Spanner. Cloud Spanner natively supports time-to-live (TTL) policies that can automatically delete rows older than a specified age, such as 30 days, making it an efficient and managed solution. Data Catalog cannot delete data, and while Bigtable supports garbage-collection policies, it is a NoSQL service better suited for large-scale analytical or time-series workloads rather than transactional ecommerce databases.
Question 17
You are developing a dashboard that aggregates temperature readings from thousands of IoT devices monitoring a city's ambient temperature. You expect a large amount of viewing traffic resulting in a large amount of data egress once the dashboard is live. The dashboard temperature display data doesn't need to be real-time and can tolerate a few seconds of lag. You decide to deploy Memorystore for Redis as the storage backend. You want to ensure that the dashboard will be highly available. How should you configure the service in Memorystore for Redis?
A. Update Memorystore for Redis to the latest version.
B. Configure Memorystore to use read replicas.
C. Use Private Service Access to enable low-latency network throughput.
D. Set up Serverless VPC Access to avoid receiving traffic over the internet.
Show Answer
Correct Answer: B
Explanation: The workload is read-heavy with high viewing traffic and can tolerate slight lag. Configuring Memorystore for Redis with read replicas scales read throughput, reduces load on the primary, and improves availability for dashboard reads. The other options do not directly address read scaling or HA for this use case.
Question 18
You are deploying a containerized application to GKE. You have set up a build pipeline by using Cloud Build that builds a Java application and pushes the application container image to Artifact Registry. Your build pipeline executes multiple sequential steps that reference Docker container images with the same layers.
You notice that the Cloud Build pipeline runs are taking longer than expected to complete. How should you optimize the Docker image build process?
A. Add the --squash parameter to the Docker build steps to combine newly built layers into a single layer.
B. Configure Cloud Build to use a private pool in your VPC for pipeline executions.
C. Specify the cached image by adding the --cache-from argument in your build config file with the image as a cache source.
D. Store container artifacts on Cloud Storage. Configure Cloud CDN on the Cloud Storage bucket to enable caching on edge locations.
Show Answer
Correct Answer: C
Explanation: Cloud Build runs each build on a fresh VM without a local Docker layer cache. Since the pipeline reuses images with common layers, the build repeatedly rebuilds or re-pulls identical layers, increasing build time. Using the --cache-from option allows Docker to pull a previously built image from Artifact Registry and reuse its layers as a build cache, significantly speeding up subsequent builds. The other options do not address Docker layer caching in Cloud Build.
Question 19
You developed a Python script that retrieves information from files that are uploaded to Cloud Storage and writes the information to Bigtable. You have completed testing on your local environment and created the python-script service account with the Bigtable User IAM role. You want to deploy the code with the appropriate authentication while following Google-recommended practices. What should you do?
A. 1. Deploy your code to Cloud Functions. Create a Cloud Storage trigger. 2. Configure IAM binding for authentication.
B. 1. Deploy your code to Cloud Functions. Create a Cloud Storage trigger. 2. Create a service account key for authentication
C. 1. Deploy your image to Cloud Run. Create a trigger in Cloud Scheduler that triggers the service every minute. 2. Configure IAM binding for authentication.
D. 1. Deploy your image to Cloud Run. Create a trigger in Cloud Scheduler that triggers the service every minute. 2. Create a service account key for authentication.
Show Answer
Correct Answer: A
Explanation: The script should run automatically when files are uploaded to Cloud Storage, which is natively supported by Cloud Functions with a Cloud Storage trigger. Google‑recommended authentication practice is to use service accounts with IAM role bindings rather than service account keys. Assigning the Bigtable User role to the Cloud Function’s service account provides secure, keyless authentication. Options using service account keys are discouraged, and Cloud Scheduler/Cloud Run do not match the event‑driven upload requirement.
Question 20
You are responsible for improving the security of your Cloud Run services to protect these services against supply chain threats. You need to ensure that there are adequate security controls such as SLSA Level 3 builds for container images and non-falsifiable provenance for container images by using Google Cloud tools. What should you do?
A. Ask developers to build container images locally and ensure strict version controls by using Container Registry.
B. Use Cloud Build to build container images. Configure a Binary Authorization policy on the Cloud Run job.
C. Use Cloud Deploy to generate authenticated and non-falsifiable build provenance for container images.
D. Use Cloud Build to build container images. Use Cloud Scheduler to automate delivery of your applications to a series of target environments in a defined sequence.
Show Answer
Correct Answer: B
Explanation: Cloud Build supports SLSA Level 3 by providing trusted, tamper-resistant builds and generating build provenance for container images. When combined with Binary Authorization on Cloud Run, you can enforce that only images built by Cloud Build with valid, non-falsifiable provenance are deployed. Cloud Deploy focuses on delivery workflows and does not itself generate or guarantee SLSA Level 3 build provenance, while the other options do not address supply chain security requirements.
$19
Get all 357 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.