Google

Professional Cloud DevOps Engineer Free Practice Questions — Page 7

Question 61

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:
Using Infrastructure as Code is the recommended approach for provisioning Google Cloud projects and baseline resources. The Cloud Foundation Toolkit provides Google-maintained Terraform modules and blueprints that implement best practices, making the process fast, reliable, repeatable, and easier to standardize than manual creation, custom scripts, or ad hoc Terraform modules.

Question 62

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:
Shadow testing mirrors real production traffic to a new version without impacting users, allowing collection of performance metrics under the full production load before launch. Canary and A/B testing expose some real users to the new version, whereas the requirement is to test against the full production load before launching.

Question 63

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:
Developers already use kubectl logs, so application logs do not need to be sent to Cloud Logging. Configuring the GKE cluster with --logging=SYSTEM collects only GKE system/operational logs while disabling workload (application) log collection, minimizing Cloud Logging costs. WORKLOAD does the opposite, disabling the default sink would also affect desired logs, and an exclusion filter based on severity is unreliable because application logs may not have consistent severity and would still ingest some workload logs.

Question 64

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:
SRE guidance is to alert only on events that require human action. If systems automatically recover within a minute and no engineer intervention is needed, those alerts are non-actionable and contribute to alert fatigue and staff burnout. Adjusting SLOs does not address noisy alerts, distributing alerts spreads the burden without reducing it, and creating incident reports for every auto-resolved event increases unnecessary work.

Question 65

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:
The key requirement is planning for capacity with large per-instance resource needs across multiple regions. Managed instance groups can only scale if sufficient regional quota and capacity are available. Validating that CPU, VM, and related resource quotas in each target region meet the expected scaling requirements is the necessary planning step. An internal load balancer is not appropriate for cross-region traffic distribution, Cloud Trace is unrelated to capacity planning, and selecting a specific machine type does not address regional capacity or quota planning.

Question 66

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: A, E
Explanation:
To reduce toil and shorten end-to-end deployment time, eliminate or minimize manual waiting. Automated promotion from development to test removes unnecessary manual approvals, and notifications for required manual intervention reduce idle time when human action is still necessary. Dividing automation into smaller tasks does not inherently reduce deployment time, scripting pipeline creation affects provisioning rather than deployment execution, and adding engineers does not reduce toil.

Question 67

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:
Cloud Storage is the appropriate secure ingestion point for third-party uploads using IAM. A Cloud Storage object finalize event can trigger a Cloud Function that scales a Compute Engine managed instance group to process compute-heavy batch workloads. Compute Engine instances are better suited than Cloud Functions for CPU-intensive, variable-sized batch jobs, and autoscaling with self-termination minimizes cost while providing rapid scale-out.

Question 68

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:
For Cloud Run, the recommended approach is to emit structured logs directly from the application by using the Cloud Logging client libraries/SDK or by writing structured JSON that Cloud Logging recognizes. Options involving a logging agent or sidecar are not appropriate for Cloud Run's managed runtime, and the logging agent configuration referenced in option D applies to environments where such an agent is used (for example, VMs), not Cloud Run.

Question 69

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:
Cloud Profiler guidance is that when CPU time is close to wall-clock time, the workload is CPU-bound, making code optimization a good candidate rather than simply adding resources. Combining this with Cloud Trace latency that is consuming the error budget helps identify applications needing performance tuning. The other resource-allocation options incorrectly infer that a large wall-clock versus CPU-time gap should be solved by adding CPU, memory, or disk; such a gap more often indicates waiting (for I/O, locks, or external services), not CPU saturation. Low heap usage indicates memory is not the limiting factor, so if performance is still poor, optimization is more appropriate than increasing memory.

Question 70

You are the Operations Lead for an ongoing incident with one of your services. The service usually runs at around 70% capacity. You notice that one node is returning 5xx errors for all requests. There has also been a noticeable increase in support cases from customers. You need to remove the offending node from the load balancer pool so that you can isolate and investigate the node. You want to follow Google-recommended practices to manage the incident and reduce the impact on users. What should you do?

A. 1. Communicate your intent to the incident team. 2. Perform a load analysis to determine if the remaining nodes can handle the increase in traffic offloaded from the removed node, and scale appropriately. 3. When any new nodes report healthy, drain traffic from the unhealthy node, and remove the unhealthy node from service.
B. 1. Communicate your intent to the incident team. 2. Add a new node to the pool, and wait for the new node to report as healthy. 3. When traffic is being served on the new node, drain traffic from the unhealthy node, and remove the old node from service.
C. 1. Drain traffic from the unhealthy node and remove the node from service. 2. Monitor traffic to ensure that the error is resolved and that the other nodes in the pool are handling the traffic appropriately. 3. Scale the pool as necessary to handle the new load. 4. Communicate your actions to the incident team.
D. 1. Drain traffic from the unhealthy node and remove the old node from service. 2. Add a new node to the pool, wait for the new node to report as healthy, and then serve traffic to the new node. 3. Monitor traffic to ensure that the pool is healthy and is handling traffic appropriately. 4. Communicate your actions to the incident team.
Show Answer
Correct Answer: A
Explanation:
The recommended incident response is to first communicate intended actions to the incident team, then verify that removing the failing node will not overload the remaining capacity by performing a load analysis and scaling if needed. Only after sufficient healthy capacity exists should traffic be drained from the unhealthy node and the node removed from service. This minimizes user impact while maintaining coordination during the incident.

$19

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