Professional Cloud DevOps Engineer Free Practice Questions — Page 9
Question 81
You are the on-call Site Reliability Engineer for a microservice that is deployed to a Google Kubernetes Engine (GKE) Autopilot cluster. Your company runs an online store that publishes order messages to Pub/Sub, and a microservice receives these messages and updates stock information in the warehousing system. A sales event caused an increase in orders, and the stock information is not being updated quickly enough. This is causing a large number of orders to be accepted for products that are out of stock. You check the metrics for the microservice and compare them to typical levels:
You need to ensure that the warehouse system accurately reflects product inventory at the time orders are placed and minimize the impact on customers. What should you do?
A. Decrease the acknowledgment deadline on the subscription.
B. Add a virtual queue to the online store that allows typical traffic levels.
C. Increase the number of Pod replicas.
D. Increase the Pod CPU and memory limits.
Show Answer
Correct Answer: C
Explanation: The problem is a processing backlog: Pub/Sub metrics show many undelivered and old unacknowledged messages, while acknowledgment latency and per-pod CPU/memory are not saturated. This indicates the microservice is throughput-limited by concurrency, not by Pub/Sub or per-pod resources. Increasing the number of Pod replicas horizontally scales message consumption and processing in parallel, reducing backlog and ensuring inventory updates keep up with incoming orders. Decreasing the ack deadline does not increase processing capacity, adding a virtual queue degrades customer experience without fixing inventory accuracy, and increasing CPU/memory limits is unnecessary when pods are not resource-bound.
Question 82
You are developing the deployment and testing strategies for your CI/CD pipeline in Google Cloud. You must be able to:
• Reduce the complexity of release deployments and minimize the duration of deployment rollbacks.
• Test real production traffic with a gradual increase in the number of affected users.
You want to select a deployment and testing strategy that meets your requirements. What should you do?
A. Recreate deployment and canary testing
B. Blue/green deployment and canary testing
C. Rolling update deployment and A/B testing
D. Rolling update deployment and shadow testing
Show Answer
Correct Answer: B
Explanation: Blue/green deployment keeps two production-ready environments, allowing instant traffic switching and very fast rollback, which reduces deployment complexity and rollback duration. Canary testing then routes a small, gradually increasing portion of real production traffic to the new version, enabling validation with minimal risk. Together, they meet both requirements.
Question 83
You manage an application that runs in Google Kubernetes Engine (GKE) and uses the blue/green deployment methodology. Extracts of the Kubernetes manifests are shown below:
The Deployment app-green was updated to use the new version of the application. During post-deployment monitoring, you notice that the majority of user requests are failing. You did not observe this behavior in the testing environment. You need to mitigate the incident impact on users and enable the developers to troubleshoot the issue. What should you do?
A. Update the Deployment app-blue to use the new version of the application.
B. Update the Deployment app-green to use the previous version of the application.
C. Change the selector on the Service app-svc to app: my-app.
D. Change the selector on the Service app-svc to app: my-app, version: blue.
Show Answer
Correct Answer: D
Explanation: In a blue/green deployment, the fastest way to mitigate user impact is to shift traffic back to the known-good (blue) version while leaving the failing (green) version running for investigation. Changing the Service selector to `app: my-app, version: blue` immediately routes traffic to the stable deployment without modifying deployments or redeploying code, enabling developers to troubleshoot the green version safely.
Question 84
Your company has a Google Cloud resource hierarchy with folders for production, test, and development. Your cyber security team needs to review your company's Google Cloud security posture to accelerate security issue identification and resolution. You need to centralize the logs generated by Google Cloud services from all projects only inside your production folder to allow for alerting and near-real time analysis. What should you do?
A. Enable the Workflows API and route all the logs to Cloud Logging.
B. Create a central Cloud Monitoring workspace and attach all related projects.
C. Create an aggregated log sink associated with the production folder that uses a Pub/Sub topic as the destination.
D. Create an aggregated log sink associated with the production folder that uses a Cloud Logging bucket as the destination.
Show Answer
Correct Answer: D
Explanation: The requirement is to **centralize logs inside the production folder** and enable **alerting and near‑real‑time analysis**. An **aggregated log sink at the folder level** collects logs from all child projects. Routing them to a **Cloud Logging bucket** keeps the logs within Cloud Logging, where they are available immediately, queryable in Logs Explorer, and usable for log‑based metrics and alerts. Pub/Sub is primarily for streaming logs to external systems and does not itself provide centralized log storage or native analysis, making it unnecessary for the stated requirement.
Question 85
You are configuring connectivity across Google Kubernetes Engine (GKE) clusters in different VPCs. You notice that the nodes in Cluster A are unable to access the nodes in Cluster B. You suspect that the workload access issue is due to the network configuration. You need to troubleshoot the issue but do not have execute access to workloads and nodes. You want to identify the layer at which the network connectivity is broken. What should you do?
A. Install a toolbox container on the node in Cluster Confirm that the routes to Cluster B are configured appropriately.
B. Use Network Connectivity Center to perform a Connectivity Test from Cluster A to Cluster
C. Use a debug container to run the traceroute command from Cluster A to Cluster B and from Cluster B to Cluster A. Identify the common failure point.
D. Enable VPC Flow Logs in both VPCs, and monitor packet drops.
Show Answer
Correct Answer: B
Explanation: You do not have execute access to workloads or nodes, so options that require installing toolboxes, debug containers, or running traceroute are not possible. Network Connectivity Center (via Network Intelligence Center Connectivity Tests) allows you to simulate and analyze connectivity between sources and destinations across VPCs at the control-plane level, identifying where connectivity breaks (routes, firewall rules, peering, etc.) without requiring runtime access. This directly fits the requirement to identify the network layer causing the issue.
Question 86
You built a serverless application by using Cloud Run and deployed the application to your production environment. You want to identify the resource utilization of the application for cost optimization. What should you do?
A. Use Cloud Trace with distributed tracing to monitor the resource utilization of the application.
B. Use Cloud Profiler with Ops Agent to monitor the CPU and memory utilization of the application.
C. Use Cloud Monitoring to monitor the container CPU and memory utilization of the application.
D. Use Cloud Ops to create logs-based metrics to monitor the resource utilization of the application.
Show Answer
Correct Answer: C
Explanation: Cloud Run automatically integrates with Cloud Monitoring and exposes container-level metrics such as CPU and memory utilization without additional setup. These metrics are exactly what you need to understand resource usage patterns and optimize costs. Cloud Trace focuses on latency, logs-based metrics are indirect, and Cloud Profiler (with Ops Agent) is not supported or required for Cloud Run and is aimed at code-level profiling rather than service-level resource utilization.
Question 87
You are implementing a CI/CD pipeline for your application in your company’s multi-cloud environment. Your application is deployed by using custom Compute Engine images and the equivalent in other cloud providers. You need to implement a solution that will enable you to build and deploy the images to your current environment and is adaptable to future changes. Which solution stack should you use?
A. Cloud Build with Packer
B. Cloud Build with Google Cloud Deploy
C. Google Kubernetes Engine with Google Cloud Deploy
D. Cloud Build with kpt
Show Answer
Correct Answer: A
Explanation: The requirement is to build and deploy custom VM images in a multi-cloud environment and remain adaptable to future changes. Packer is purpose-built for creating identical machine images across multiple cloud providers from a single configuration, making it ideal for multi-cloud image pipelines. Cloud Build provides the CI/CD automation to run Packer builds and manage image creation and deployment. The other options focus on Kubernetes or GCP-only deployment tooling and do not address multi-cloud VM image creation.
Question 88
The new version of your containerized application has been tested and is ready to be deployed to production on Google Kubernetes Engine (GKE). You could not fully load-test the new version in your pre-production environment, and you need to ensure that the application does not have performance problems after deployment. Your deployment must be automated. What should you do?
A. Deploy the application through a continuous delivery pipeline by using canary deployments. Use Cloud Monitoring to look for performance issues, and ramp up traffic as supported by the metrics.
B. Deploy the application through a continuous delivery pipeline by using blue/green deployments. Migrate traffic to the new version of the application and use Cloud Monitoring to look for performance issues.
C. Deploy the application by using kubectl and use Config Connector to slowly ramp up traffic between versions. Use Cloud Monitoring to look for performance issues.
D. Deploy the application by using kubectl and set the spec.updateStrategy.type field to RollingUpdate. Use Cloud Monitoring to look for performance issues, and run the kubectl rollback command if there are any issues.
Show Answer
Correct Answer: A
Explanation: You could not fully load-test pre-production and need to detect performance issues safely after release with an automated deployment. Canary deployments are designed for this scenario: they route a small percentage of production traffic to the new version, use Cloud Monitoring to evaluate performance, and gradually increase traffic only if metrics remain healthy. This minimizes blast radius while validating real production load. Blue/green shifts all traffic at once, and manual kubectl-based approaches are less automated and riskier.
Question 89
You work for a global organization and run a service with an availability target of 99% with limited engineering resources.
For the current calendar month, you noticed that the service has 99.5% availability. You must ensure that your service meets the defined availability goals and can react to business changes, including the upcoming launch of new features.
You also need to reduce technical debt while minimizing operational costs. You want to follow Google-recommended practices. What should you do?
A. Add N+1 redundancy to your service by adding additional compute resources to the service.
B. Identify, measure, and eliminate toil by automating repetitive tasks.
C. Define an error budget for your service level availability and minimize the remaining error budget.
D. Allocate available engineers to the feature backlog while you ensure that the service remains within the availability target.
Show Answer
Correct Answer: C
Explanation: Google SRE best practice is to manage reliability through Service Level Objectives and error budgets. Since the service is exceeding its 99% availability target (99.5%), you have unused error budget. Defining and actively managing this error budget allows you to safely increase deployment velocity, launch new features, and address technical debt without exceeding availability goals, all while controlling operational costs. This directly aligns reliability with business needs rather than over‑engineering availability.
Question 90
You are building and running client applications in Cloud Run and Cloud Functions. Your client requires that all logs must be available for one year so that the client can import the logs into their logging service. You must minimize required code changes. What should you do?
A. Update all images in Cloud Run and all functions in Cloud Functions to send logs to both Cloud Logging and the client's logging service. Ensure that all the ports required to send logs are open in the VPC firewall.
B. Create a Pub/Sub topic, subscription, and logging sink. Configure the logging sink to send all logs into the topic. Give your client access to the topic to retrieve the logs.
C. Create a storage bucket and appropriate VPC firewall rules. Update all images in Cloud Run and all functions in Cloud Functions to send logs to a file within the storage bucket.
D. Create a logs bucket and logging sink. Set the retention on the logs bucket to 365 days. Configure the logging sink to send logs to the bucket. Give your client access to the bucket to retrieve the logs.
Show Answer
Correct Answer: D
Explanation: Cloud Run and Cloud Functions already write logs to Cloud Logging by default. Creating a dedicated logs bucket with a 365‑day retention and routing logs to it via a logging sink requires no application code changes, meets the one‑year retention requirement, and allows controlled access for the client to export/import logs. Other options require code changes or are not the recommended logging architecture.
$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.