Professional Cloud DevOps Engineer Free Sample Questions

Description

Covers designing a Google Cloud resource hierarchy, building and managing CI/CD pipelines, applying site reliability engineering practices, and managing logs, metrics, and dashboards.

20 free sample questions180 in the full practice test

Try simulator

PCDOE Sample Questions

  1. Question 1

    Advanced

    Building and implementing CI/CD pipelines for applications and infrastructure · Securing the CI/CD deployment pipeline

    A financial services company is building a CI/CD pipeline using Cloud Build and Cloud Deploy. To comply with internal security policies, they must ensure that only container images that have passed all vulnerability scans and integration tests are deployable to their production GKE clusters. Furthermore, the mechanism enforcing this must be resistant to tampering, even by users with project owner roles. Which combination of services should be implemented to meet these requirements?

    Answer and explanation

    Correct answer: C

    This is the most secure and tamper-resistant solution. Binary Authorization is a service specifically designed to enforce deployment-time policies on GKE. By creating a cryptographic attestation (a signature proving the image passed all checks) in a secure build environment and requiring that attestation in the GKE cluster's policy, you create a strong, auditable link. This enforcement happens at the GKE control plane level and cannot be easily bypassed, even by project owners, without modifying the Binary Authorization policy itself, which can be tightly controlled.

  2. Question 2

    Advanced

    Applying site reliability engineering practices to applications · Balancing change, velocity, and reliability of the service

    You are the SRE lead for a critical order processing service composed of three microservices: an API Gateway, a Processing Service, and a Database Writer. The overall service is considered successful only if an order is accepted by the gateway, fully processed by the service, and successfully written to the database. The individual SLOs are: Gateway (99.95% availability), Processing Service (99.9% availability), and Database Writer (99.99% availability). Assuming these components fail independently, what is the correct composite SLO for the end-to-end user journey?

    Answer and explanation

    Correct answer: C

    For a user journey that depends on multiple components in series, the overall availability is the product of the individual component availabilities. Each component represents a potential point of failure for the entire transaction. Therefore, the composite SLO is calculated by multiplying the individual SLOs: 0.9995 * 0.999 * 0.9999 ≈ 0.9984, or 99.84%. This demonstrates that serial dependencies decrease overall reliability.

  3. Question 3

    Intermediate

    Implementing observability practices · Managing logs

    You are managing a multi-tenant GKE cluster where each tenant application runs in its own namespace. One tenant deployed a custom Fluentd configuration as a DaemonSet to forward their specific application logs to an external analytics service. Shortly after, your central Cloud Logging view stops receiving any logs from the nodes where this tenant's pods are running. Logs from other applications on the same nodes are also missing. What is the most likely cause of this issue?

    Answer and explanation

    Correct answer: B

    GKE uses a managed Fluentd DaemonSet as its default logging agent on each node. When a user deploys another log-forwarding DaemonSet, especially one that also tries to read from standard log locations like /var/log, it can create resource contention or configuration conflicts. The most common issue is that the custom agent 'steals' the log files or interferes with the default agent's ability to read them, effectively stopping the flow of logs to Cloud Logging for that entire node.

  4. Question 4

    Beginner

    Bootstrapping and maintaining a Google Cloud organization · Managing infrastructure

    A development team is starting a new project on Google Cloud and needs to manage their infrastructure as code. The team has extensive experience with Kubernetes YAML but is new to cloud infrastructure provisioning. They want a tool that allows them to define their GCP resources using a Kubernetes-style, declarative syntax and manage them through their GKE cluster. Which IaC tool is the best fit for this team's requirements?

    Answer and explanation

    Correct answer: C

    Config Connector is specifically designed for this use case. It is a Kubernetes addon that allows you to manage GCP resources (like Pub/Sub topics, Cloud SQL instances, etc.) as Kubernetes Custom Resource Definitions (CRDs). This enables teams familiar with kubectl and YAML manifests to use the same tools and workflows to manage both their applications and their underlying cloud infrastructure, fitting their existing skillset perfectly.

  5. Question 5

    AdvancedMultiple answers

    Optimizing performance and troubleshooting · Troubleshooting issues

    An e-commerce application running on GKE is experiencing intermittent latency spikes during checkout. The system consists of a frontend service, a cart service, and an inventory service. To begin troubleshooting, you need to understand the flow of requests and identify which service call is introducing the most latency. What are the TWO most effective initial steps to take? (Select TWO)

    sequenceDiagram participant User participant Frontend participant CartSvc as Cart Service participant InvSvc as Inventory Service User->>Frontend: POST /checkout Frontend->>CartSvc: GET /cart/items CartSvc-->>Frontend: Cart Items Frontend->>InvSvc: POST /inventory/reserve InvSvc-->>Frontend: Reservation Confirmed Frontend-->>User: Checkout Complete

    Answer and explanation

    Correct answers: A, D

    While Cloud Trace is excellent for inter-service latency, Cloud Profiler is crucial for intra-service latency. If a trace shows a specific service is slow, Profiler is the next step to pinpoint the exact function or code path within that service causing high CPU usage or lock contention, which are common causes of latency.

    Cloud Trace is the primary tool for understanding latency in a distributed microservices architecture. By analyzing the trace waterfall for a slow request, you can visually identify which service-to-service call is taking the longest time, immediately narrowing down the scope of the investigation.

  6. Question 6

    Intermediate

    Building and implementing CI/CD pipelines for applications and infrastructure · Applying CI/CD practices to infrastructure

    Your organization manages dozens of GCP projects using Terraform. Multiple teams are making infrastructure changes concurrently, leading to conflicts and accidental overwrites of the Terraform state file. You need to implement a solution that provides state locking and a consistent, shared backend for all team members. Which Google Cloud service should you configure as the Terraform backend to achieve this?

    Answer and explanation

    Correct answer: B

    Cloud Storage is the recommended and standard backend for Terraform on GCP. When configured as a backend, it stores the state file centrally. Crucially, the GCS backend for Terraform natively supports state locking by creating a lock object in the bucket while an operation is in progress. This prevents other users from running terraform apply concurrently, thus avoiding state file corruption and conflicts.

  7. Question 7

    Beginner

    Applying site reliability engineering practices to applications · Balancing change, velocity, and reliability of the service

    True or False: An error budget represents the maximum amount of time a service can be unavailable or perform below its SLO before violating its contractual SLA with a customer.

    Answer and explanation

    Correct answer: B

    This statement is false. An error budget is derived from the Service Level Objective (SLO), which is an internal reliability target. It is not directly tied to the Service Level Agreement (SLA), which is an external, often legally binding, contract with customers. The SLO is typically stricter than the SLA to provide a buffer. The error budget is the amount of acceptable 'unreliability' (100% - SLO) that can be 'spent' on new releases, maintenance, or unavoidable failures without alerting engineers, whereas violating an SLA has financial or contractual consequences.

  8. Question 8

    Intermediate

    Implementing observability practices · Logging optimization

    Your company's application generates a large volume of debug-level logs that are useful for real-time troubleshooting but are expensive to retain in Cloud Logging for the mandatory 90-day period. You also need to perform complex analytical queries on all retained logs. What is the most cost-effective approach to meet these requirements?

    Answer and explanation

    Correct answer: C

    This approach is the most cost-effective. A log sink forwards logs to a destination like BigQuery before they are processed for exclusion. This means all logs, including debug logs, are sent to BigQuery for cheap, long-term storage and powerful analytical querying. The exclusion filter then prevents the expensive debug logs from being ingested and stored in the standard Cloud Logging buckets, which are optimized for real-time access and have higher storage costs. This meets both requirements efficiently.

  9. Question 9

    IntermediateMultiple answers

    Bootstrapping and maintaining a Google Cloud organization · Creating and managing service accounts

    You are creating a dedicated service account for a Cloud Build pipeline. The pipeline needs to perform the following actions: build a Docker image, push the image to Artifact Registry, and deploy the new image as a service revision to Cloud Run. Following the principle of least privilege, which THREE IAM roles should you grant to this service account? (Select THREE)

    Answer and explanation

    Correct answers: B, C, D

    This role grants the necessary permissions (artifactregistry.repositories.uploadArtifacts) to push the newly built container image to the specified Artifact Registry repository.

    This role provides permissions to create and manage Cloud Run revisions, services, and configurations, which is exactly what is needed to deploy the new image.

    To deploy a new revision to Cloud Run, the deploying identity (the Cloud Build service account) needs permission to act as the runtime service account of the Cloud Run service (iam.serviceAccounts.actAs). This role grants that permission.

  10. Question 10

    Advanced

    Optimizing performance and troubleshooting · Google Cloud recommenders

    The Google Cloud Recommender API suggests changing the machine type for a fleet of critical production VMs from n2-standard-4 to e2-medium to save costs. A direct application of this change previously caused an outage due to unexpected performance degradation. As an SRE, what is the best practice for safely validating and implementing this type of recommendation in the future?

    Answer and explanation

    Correct answer: C

    This SRE practice balances cost optimization with reliability. Instead of a 'big bang' change, a canary release allows you to test the recommendation on a small percentage of live traffic. By creating a new instance template and performing a rolling update to a subset of the managed instance group, you can compare the performance SLIs (latency, error rate, CPU utilization) of the new machine type against the existing baseline. If performance degrades, you can easily roll back with minimal user impact.

Register free for 10 more questions

Or unlock all 180 PCDOE questions with explanations, timed mode and flashcards.