Back to Google Professional Cloud DevOps Engineer questions

Scenario-based practice

Refer to the Exhibit Practice Questions

Practise Google Professional Cloud DevOps Engineer practice questions — original exam-style scenarios covering every exam domain, with detailed explanations, wrong-answer analysis, and common exam traps.

15
scenario questions
PCDOE
exam code
Google Cloud
vendor

Scenario guide

How to approach refer to the exhibit practice questions

Practise exhibit-style questions that ask you to read a topology, table, command output or diagram before choosing the best answer.

Quick answer

Exhibit-style questions test whether you can read a topology, command output, diagram or table before choosing the best answer.

How to extract the relevant detail from an exhibit.

How topology, command output or routing information affects the answer.

How to avoid answering from memory before reading the evidence.

How to map the exhibit back to the exam objective.

Related practice questions

Related PCDOE topic practice pages

Scenario questions usually connect to one or more exam topics. Use these links to review the underlying concepts behind the scenario.

Practice set

Practice scenarios

Question 1mediummultiple choice
Full question →

Refer to the exhibit. The Cloud Build fails with a permission error. The Cloud Build service account has roles/cloudbuild.builds.builder and roles/cloudfunctions.developer on the project. What is the missing permission?

Exhibit

steps:
- name: 'gcr.io/cloud-builders/gcloud'
  entrypoint: 'bash'
  args:
    - '-c'
    - |
      gcloud functions deploy my-function \
        --runtime nodejs18 \
        --trigger-http \
        --allow-unauthenticated
Question 2hardmultiple choice
Full question →

Refer to the exhibit. After applying the shown firewall rule, users report increased latency to a web application. What is the most likely cause?

Exhibit

Firewall rule JSON:
{
  "name": "deny-high-latency",
  "network": "default",
  "priority": 1000,
  "direction": "INGRESS",
  "sourceRanges": ["0.0.0.0/0"],
  "allow": [{"protocol": "tcp", "ports": ["80","443"]}],
  "deny": [{"protocol": "tcp", "ports": ["80","443"]}],
  "logConfig": {"metadata": "INCLUDE_ALL_METADATA"}
}
Question 3easymultiple choice
Full question →

Refer to the exhibit. The output shows three folders created directly under the organization node. Which gcloud command was most likely executed to produce this output?

Network Topology
gcloud resource-manager folders listorganization=123456789012Output:DISPLAY_NAME PARENT_NAME IDProduction organizations/123456789012 987654321Staging organizations/123456789012 876543210Development organizations/123456789012 765432109
Question 4mediummultiple choice
Full question →

Refer to the exhibit. A DevOps engineer tries to create a project but gets this error. What is the most likely cause?

Exhibit

```
$ gcloud organizations list
ID: 123456789012
$ gcloud projects create my-project --organization=123456789012
ERROR: (gcloud.projects.create) FAILED_PRECONDITION: Project creation is restricted.
```
Question 5hardmultiple choice
Full question →

Refer to the exhibit. What is the effect of the metricRelabelings section in this ServiceMonitor?

Exhibit

Refer to the exhibit.
```yaml
apiVersion: monitoring.googleapis.com/v1
kind: ServiceMonitor
metadata:
  name: my-service-monitor
  namespace: default
spec:
  selector:
    matchLabels:
      app: my-app
  endpoints:
  - port: http
    interval: 30s
  namespaceSelector:
    matchNames:
    - production
  sampleLimit: 1000
  targetLabels:
  - instance
  metricRelabelings:
  - sourceLabels: [__name__]
    regex: 'container_.*'
    action: drop
```
Question 6mediummultiple choice
Full question →

Based on the exhibit, what does the duration of 300s mean in this alerting policy?

Exhibit

Refer to the exhibit.
```json
{
  "name": "projects/my-project/alertPolicies/123456789",
  "displayName": "High CPU Alert",
  "conditions": [
    {
      "name": "projects/my-project/alertPolicies/123456789/conditions/987654321",
      "displayName": "CPU Utilization > 80%",
      "conditionThreshold": {
        "filter": "metric.type=\"compute.googleapis.com/instance/cpu/utilization\" resource.type=\"gce_instance\"",
        "aggregations": [
          {
            "alignmentPeriod": "60s",
            "perSeriesAligner": "ALIGN_MEAN"
          }
        ],
        "comparison": "COMPARISON_GT",
        "thresholdValue": 0.8,
        "duration": "300s",
        "trigger": {
          "count": 1
        }
      }
    }
  ]
}
```
Question 7hardmultiple choice
Full question →

A team has set up the alerting policies shown in the exhibit. They receive an alert for High Memory but not for High CPU. What is the most likely reason?

Exhibit

Refer to the exhibit.

```
{
  "alertPolicies": [
    {
      "displayName": "High CPU Alert",
      "combiner": "OR",
      "conditions": [
        {
          "displayName": "CPU usage > 80%",
          "conditionThreshold": {
            "filter": "metric.type=\"compute.googleapis.com/instance/cpu/utilization\" resource.type=\"gce_instance\"",
            "comparison": "COMPARISON_GT",
            "thresholdValue": 0.8,
            "duration": "300s",
            "trigger": {
              "count": 1
            }
          }
        }
      ]
    },
    {
      "displayName": "High Memory Alert",
      "conditions": [
        {
          "displayName": "Memory usage > 90%",
          "conditionThreshold": {
            "filter": "metric.type=\"agent.googleapis.com/memory/percent_used\" resource.type=\"gce_instance\"",
            "comparison": "COMPARISON_GT",
            "thresholdValue": 0.9,
            "duration": "60s",
            "trigger": {
              "count": 1
            }
          }
        }
      ]
    }
  ]
}
```
Question 8mediummultiple choice
Full question →

Refer to the exhibit. A team uses this cloudbuild.yaml to deploy a service to Cloud Run. They notice that the deployment fails intermittently with a 'permission denied' error. Which is the most likely cause?

Network Topology
args: ['run'image'region'Refer to the exhibit.```yaml# cloudbuild.yamlsteps:- name: 'gcr.io/cloud-builders/docker'args: ['build', '-t', 'us-central1-docker.pkg.dev/my-project/my-repo/my-image:$SHORT_SHA', '.']args: ['push', 'us-central1-docker.pkg.dev/my-project/my-repo/my-image:$SHORT_SHA']- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'entrypoint: 'gcloud'images:- 'us-central1-docker.pkg.dev/my-project/my-repo/my-image:$SHORT_SHA'```
Question 9hardmultiple choice
Full question →

Refer to the exhibit. You are investigating a performance issue where the api-server container is using excessive CPU. You run a Cloud Monitoring API query and receive the JSON configuration shown. However, the query returns no data points. What is the most likely cause?

Exhibit

Refer to the exhibit.

```
{
  "monitoredResource": {
    "type": "k8s_container",
    "labels": {
      "project_id": "my-project",
      "location": "us-central1",
      "cluster_name": "prod-cluster",
      "namespace_name": "default",
      "pod_name": "api-server-7d8f9c",
      "container_name": "api-server"
    }
  },
  "interval": {
    "startTime": "2025-02-10T10:00:00Z",
    "endTime": "2025-02-10T11:00:00Z"
  },
  "aggregation": {
    "alignmentPeriod": "60s",
    "perSeriesAligner": "ALIGN_MEAN",
    "crossSeriesReducer": "REDUCE_SUM"
  },
  "filter": "metric.type="kubernetes.io/container/cpu/core_usage_time" AND resource.labels.container_name="api-server"",
  "metric": {
    "type": "kubernetes.io/container/cpu/core_usage_time"
  }
}
Question 10easymultiple choice
Full question →

Refer to the exhibit. The output shows a recommendation from the Cloud Cost Optimization recommender for an instance in us-central1-a. The instance is a production web server that consistently runs at 25% CPU utilization during peak hours. What should the DevOps engineer do to implement this recommendation with minimal risk?

Network Topology
project=my-projectlocation=us-central1recommender=google.cloudcosts.Recommenderformat=jsonRefer to the exhibit.```"primaryImpact": {"costProjection": {"cost": {"currencyCode": "USD","units": "-104","nanos": 640000000},"duration": "2592000s""recommenderSubtype": "CHANGE_MACHINE_TYPE","content": {"overview": {"targetResources": ["//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/instance-1"],"recommendedMachineType": "n2-standard-4","currentMachineType": "n2-standard-8"
Question 11mediummultiple choice
Full question →

Refer to the exhibit. An App Engine application returns 504 errors. The application calls an external API and processes the result. Which change is most likely to resolve the errors?

Exhibit

Refer to the exhibit.

---
# Sample error from Cloud Logging
{
  "httpRequest": {
    "requestUrl": "https://example.com/data",
    "status": 504
  },
  "resource": {
    "type": "gae_app",
    "labels": {
      "module_id": "default",
      "version_id": "v2"
    }
  },
  "textPayload": "The request was terminated because it took longer than 60 seconds."
}
---
Question 12hardmultiple choice
Full question →

Refer to the exhibit. A team uses these Compute Engine instances to run a batch processing job. The job frequently gets killed on instance-3. What is the most likely cause?

Exhibit

NAME        ZONE          MACHINE_TYPE   PREEMPTIBLE  INTERNAL_IP   EXTERNAL_IP    STATUS
instance-1  us-central1-c  n1-standard-2  false        10.128.0.2    34.67.89.100   RUNNING
instance-2  us-central1-c  n1-highmem-4   false        10.128.0.3    34.67.89.101   RUNNING
instance-3  us-central1-c  n1-standard-2  true         10.128.0.4    34.67.89.102   RUNNING
Question 13hardmultiple choice
Full question →

Refer to the exhibit. A DevOps engineer is trying to create a new project using the Cloud Console. The project creation fails with a policy violation. The engineer has permissions on folders/12345678 and folders/87654321 but not on any other folders. They select folder/87654321 as the parent. What is the most likely reason for the failure?

Exhibit

{
  "name": "projects/my-project/policies/constraints/resourcemanager.allowedProjectParent",
  "spec": {
    "rules": [
      {
        "values": {
          "allowedValues": [
            "folders/12345678"
          ]
        }
      }
    ]
  }
}
Question 14mediummultiple choice
Full question →

Refer to the exhibit. You see this log entry from a Cloud Run service. The stack trace shows the error occurs in handler.js at line 50. You want to see the state of variables at that point in the production environment without adding logging or redeploying. What should you do?

Exhibit

```json
{
  "insertId": "abc123",
  "textPayload": "Error: Invalid input at Object.parse (/app/node_modules/package/index.js:100:15) at module.exports (/app/handler.js:50:10) at Runtime.handle (/app/index.js:20:5)",
  "resource": {
    "type": "cloud_run_revision",
    "labels": {
      "service_name": "my-service",
      "configuration_name": "my-service",
      "revision_name": "my-service-00001-bad"
    }
  },
  "severity": "ERROR",
  "timestamp": "2024-03-15T10:00:00Z"
}
```
Question 15mediummultiple choice
Full question →

Refer to the exhibit. You are reviewing an alert policy for CPU utilization. What is a potential problem with this configuration?

Exhibit

```json
{
  "displayName": "High CPU Alert",
  "conditions": [
    {
      "displayName": "CPU utilization > 80%",
      "conditionThreshold": {
        "filter": "metric.type=\"compute.googleapis.com/instance/cpu/utilization\" AND resource.type=\"gce_instance\"",
        "comparison": "COMPARISON_GT",
        "thresholdValue": 0.8,
        "duration": "60s",
        "trigger": {
          "count": 1
        }
      }
    }
  ],
  "combiner": "OR",
  "alertStrategy": {
    "autoClose": "3600s"
  },
  "notificationChannels": ["projects/my-project/notificationChannels/12345"]
}
```

These PCDOE practice questions are part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style PCDOE questions with detailed explanations, topic-based practice, mock exams, readiness tracking, and study analytics.