Google

Professional Cloud DevOps Engineer Free Practice Questions — Page 6

Question 51

You have an application that runs on Cloud Run. You want to use live production traffic to test a new version of the application, while you let the quality assurance team perform manual testing. You want to limit the potential impact of any issues while testing the new version, and you must be able to roll back to a previous version of the application if needed. How should you deploy the new version? (Choose two.)

A. Deploy the application as a new Cloud Run service.
B. Deploy a new Cloud Run revision with a tag and use the --no-traffic option.
C. Deploy a new Cloud Run revision without a tag and use the --no-traffic option.
D. Deploy the new application version and use the --no-traffic option. Route production traffic to the revision’s URL.
E. Deploy the new application version, and split traffic to the new version.
Show Answer
Correct Answer: B, E
Explanation:
To test safely with live production traffic while allowing manual QA testing and easy rollback on Cloud Run, you should use revisions and traffic management. Option B is correct because deploying a new revision with a tag and the --no-traffic option allows the QA team to manually test the new version via the tagged URL without affecting production users. Option E is correct because splitting traffic lets you send a controlled percentage of live production traffic to the new revision. This limits blast radius, supports gradual rollout, and enables instant rollback by shifting traffic back to the previous revision. The other options are incorrect because they either create unnecessary services, make QA access difficult, or misunderstand how Cloud Run production traffic is routed.

Question 52

Your company recently migrated to Google Cloud. You need to design a fast, reliable, and repeatable solution for your company to provision new projects and basic resources in Google Cloud. What should you do?

A. Use the Google Cloud console to create projects.
B. Write a script by using the gcloud CLI that passes the appropriate parameters from the request. Save the script in a Git repository.
C. Write a Terraform module and save it in your source control repository. Copy and run the terraform apply command to create the new project.
D. Use the Terraform repositories from the Cloud Foundation Toolkit. Apply the code with appropriate parameters to create the Google Cloud project and related resources.
Show Answer
Correct Answer: D
Explanation:
The requirement is for a fast, reliable, and repeatable way to provision Google Cloud projects and baseline resources. Infrastructure as Code is the best practice for this. The Cloud Foundation Toolkit provides Google‑maintained, opinionated Terraform modules (such as the Project Factory) that follow Google Cloud best practices, support automation, and are designed for scalability and consistency. This makes option D superior to manual console use, ad‑hoc scripts, or custom Terraform without standardized foundations.

Question 53

You are designing a deployment technique for your applications on Google Cloud. As part of your deployment planning, you want to use live traffic to gather performance metrics for new versions of your applications. You need to test against the full production load before your applications are launched. What should you do?

A. Use A/B testing with blue/green deployment.
B. Use canary testing with continuous deployment.
C. Use canary testing with rolling updates deployment.
D. Use shadow testing with continuous deployment.
Show Answer
Correct Answer: D
Explanation:
The requirement is to test a new version using full production traffic and gather performance metrics without impacting users before launch. Shadow testing mirrors live production traffic to the new version while the existing version continues serving users, enabling validation under full load with zero user impact. Canary, rolling, A/B, and blue/green approaches all route some real user traffic to the new version, which does not meet the requirement.

Question 54

Your company runs services by using Google Kubernetes Engine (GKE). The GKE dusters in the development environment run applications with verbose logging enabled. Developers view logs by using the kubectl logs command and do not use Cloud Logging. Applications do not have a uniform logging structure defined. You need to minimize the costs associated with application logging while still collecting GKE operational logs. What should you do?

A. Run the gcloud container clusters update --logging=SYSTEM command for the development cluster.
B. Run the gcloud container clusters update --logging=WORKLOAD command for the development cluster.
C. Run the gcloud logging sinks update _Default --disabled command in the project associated with the development environment.
D. Add the severity >= DEBUG resource.type = "k8s_container" exclusion filter to the _Default logging sink in the project associated with the development environment.
Show Answer
Correct Answer: A
Explanation:
To minimize logging costs while still collecting GKE operational logs, you should disable workload (application) logs being sent to Cloud Logging and keep only system logs. Using `gcloud container clusters update --logging=SYSTEM` does exactly this: it retains GKE system and control plane logs needed for operations, while stopping verbose application logs from being ingested into Cloud Logging. Developers can still view application logs using `kubectl logs`, so no functionality is lost. The other options either keep workload logs (higher cost), disable all logs, or rely on exclusion filters that may not catch all application logs and still incur ingestion costs.

Question 55

You encounter a large number of outages in the production systems you support. You receive alerts for all the outages, the alerts are due to unhealthy systems that are automatically restarted within a minute. You want to set up a process that would prevent staff burnout while following Site Reliability Engineering (SRE) practices. What should you do?

A. Eliminate alerts that are not actionable
B. Redefine the related SLO so that the error budget is not exhausted
C. Distribute the alerts to engineers in different time zones
D. Create an incident report for each of the alerts
Show Answer
Correct Answer: A
Explanation:
In SRE, alerts should be actionable and require human intervention. These outages self-heal within a minute, so alerting on them creates alert fatigue and staff burnout without improving reliability. Eliminating non-actionable alerts aligns with SRE best practices. The other options do not address alert fatigue or unnecessarily add process overhead.

Question 56

You need to deploy a new service to production. The service needs to automatically scale using a managed instance group and should be deployed across multiple regions. The service needs a large number of resources for each instance and you need to plan for capacity. What should you do?

A. Monitor results of Cloud Trace to determine the optimal sizing.
B. Use the n2-highcpu-96 machine type in the configuration of the managed instance group.
C. Deploy the service in multiple regions and use an internal load balancer to route traffic.
D. Validate that the resource requirements are within the available project quota limits of each region.
Show Answer
Correct Answer: D
Explanation:
When deploying a highly scalable service with managed instance groups across multiple regions, planning for capacity is critical. Large instance sizes and autoscaling can quickly hit regional or project-level quotas (vCPUs, instances, IPs). Validating that resource requirements fit within the available quota in each region is a necessary prerequisite to successful multi-region scaling. The other options either focus on monitoring, a specific machine type, or traffic routing, none of which address capacity planning constraints.

Question 57

You are reviewing your deployment pipeline in Google Cloud Deploy. You must reduce toil in the pipeline, and you want to minimize the amount of time it takes to complete an end-to-end deployment. What should you do? (Choose two.)

A. Create a trigger to notify the required team to complete the next step when manual intervention is required.
B. Divide the automation steps into smaller tasks.
C. Use a script to automate the creation of the deployment pipeline in Google Cloud Deploy.
D. Add more engineers to finish the manual steps.
E. Automate promotion approvals from the development environment to the test environment.
Show Answer
Correct Answer: B, E
Explanation:
The goals are to reduce toil (manual, repetitive work) and minimize end-to-end deployment time. B is correct because breaking automation into smaller tasks enables better orchestration and potential parallelization, which improves pipeline efficiency and reduces overall deployment duration. E is correct because automating promotion approvals removes manual intervention between environments, directly reducing toil and eliminating delays caused by human approvals. The other options either retain manual steps (A, D) or focus on initial setup rather than deployment execution time (C).

Question 58

Your team is building a service that performs compute-heavy processing on batches of data. The data is processed faster based on the speed and number of CPUs on the machine. These batches of data vary in size and may arrive at any time from multiple third-party sources. You need to ensure that third parties are able to upload their data securely. You want to minimize costs, while ensuring that the data is processed as quickly as possible. What should you do?

A. Provide a secure file transfer protocol (SFTP) server on a Compute Engine instance so that third parties can upload batches of data, and provide appropriate credentials to the server. Create a Cloud Function with a google.storage.object.finalize Cloud Storage trigger. Write code so that the function can scale up a Compute Engine autoscaling managed instance group Use an image pre-loaded with the data processing software that terminates the instances when processing completes.
B. Provide a Cloud Storage bucket so that third parties can upload batches of data, and provide appropriate Identity and Access Management (IAM) access to the bucket. Use a standard Google Kubernetes Engine (GKE) cluster and maintain two services: one that processes the batches of data, and one that monitors Cloud Storage for new batches of data. Stop the processing service when there are no batches of data to process.
C. Provide a Cloud Storage bucket so that third parties can upload batches of data, and provide appropriate Identity and Access Management (IAM) access to the bucket. Create a Cloud Function with a google.storage.object.finalize Cloud Storage trigger. Write code so that the function can scale up a Compute Engine autoscaling managed instance group. Use an image pre-loaded with the data processing software that terminates the instances when processing completes.
D. Provide a Cloud Storage bucket so that third parties can upload batches of data, and provide appropriate Identity and Access Management (IAM) access to the bucket. Use Cloud Monitoring to detect new batches of data in the bucket and trigger a Cloud Function that processes the data. Set a Cloud Function to use the largest CPU possible to minimize the runtime of the processing.
Show Answer
Correct Answer: C
Explanation:
Option C best meets the requirements. Using Cloud Storage with IAM provides a secure, low-cost, and scalable ingestion point for third parties. A Cloud Function triggered by object finalization is event-driven and cost-efficient, responding only when data arrives. The function can scale a Compute Engine managed instance group with pre-loaded processing software, allowing compute-heavy workloads to use as many CPUs as needed and scale based on batch size. Instances terminate after processing, minimizing idle costs. Other options either introduce unnecessary always-on infrastructure, higher operational overhead, or are unsuitable for heavy batch processing.

Question 59

Your Cloud Run application writes unstructured logs as text strings to Cloud Logging. You want to convert the unstructured logs to JSON-based structured logs. What should you do?

A. Modify the application to use Cloud Logging software development kit (SDK), and send log entries with a jsonPayload field.
B. Install a Fluent Bit sidecar container, and use a JSON parser.
C. Install the log agent in the Cloud Run container image, and use the log agent to forward logs to Cloud Logging.
D. Configure the log agent to convert log text payload to JSON payload.
Show Answer
Correct Answer: A
Explanation:
In Cloud Run, logs are automatically collected from stdout/stderr by the platform, and you cannot install or configure a Logging agent. To get JSON-based structured logs, the recommended and supported approach is to have the application emit structured logs directly. Using the Cloud Logging SDK (or supported logging libraries) allows the application to write log entries with a jsonPayload, which Cloud Logging natively understands as structured logs. Options involving log agents or payload conversion (C and D) are not applicable to Cloud Run, and a Fluent Bit sidecar (B) adds unnecessary complexity when you control the application code.

Question 60

You are analyzing Java applications in production. All applications have Cloud Profiler and Cloud Trace installed and configured by default. You want to determine which applications need performance tuning. What should you do? (Choose two.)

A. Examine the wall-clock time and the CPU time of the application. If the difference is substantial increase the CPU resource allocation.
B. Examine the wall-clock time and the CPU time of the application. If the difference is substantial, increase the memory resource allocation.
C. Examine the wall-clock time and the CPU time of the application. If the difference is substantial, increase the local disk storage allocation.
D. Examine the latency time the wall-clock time and the CPU time of the application. If the latency time is slowly burning down the error budget, and the difference between wall-clock time and CPU time is minimal mark the application for optimization.
E. Examine the heap usage of the application. If the usage is low, mark the application for optimization.
Show Answer
Correct Answer: D, E
Explanation:
Applications that need performance tuning are those where adding more resources will not help. From Cloud Profiler and Trace, if latency is consuming the error budget and CPU time is nearly equal to wall‑clock time, the application is CPU‑bound and spending most of its time executing code rather than waiting on I/O, making it a strong candidate for optimization (D). Additionally, low heap usage indicates that memory is not a limiting factor, so increasing memory would not improve performance; inefficiencies are likely in the code itself, which again points to the need for tuning (E).

$19

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