Skip to main content

PROFESSIONAL-CLOUD-DEVOPS-ENGINEER Real Exam Questions

Google Cloud Certified - Professional Cloud DevOps Engineer

192 questions available · Page 1 of 20

Updated Exam DumpsVerified AnswersPass Guarantee

Get Complete Exam Dumps
Question 1 Single choice

You are deploying a Cloud Build job that deploys Terraform code when a Git branch is updated. While testing, you noticed that the job fails. You see the following error in the build logs:

Initializing the backend...

Error: Failed to get existing workspaces: querying Cloud Storage failed: googleapi: Error 403 You need to resolve the issue by following Google-recommended practices.

What should you do?

  1. A

    Change the Terraform code to use local state.

  2. B

    Create a storage bucket with the name specified in the Terraform configuration.

  3. C

    Grant the roles/owner Identity and Access Management (IAM) role to the Cloud Build service account on the project.

  4. D

    Grant the roles/storage.objectAdmin Identity and Access Management (1AM) role to the Cloud Build service account on the state file bucket.

Show answer and explanation

Correct answer: D

Question 2 Single choice

You use a multiple step Cloud Build pipeline to build and deploy your application to Google Kubernetes Engine (GKE). You want to integrate with a third-party monitoring platform by performing a HTTP POST of the build information to a webhook. You want to minimize the development effort.

What should you do?

  1. A

    Add logic to each Cloud Build step to HTTP POST the build information to a webhook.

  2. B

    Add a new step at the end of the pipeline in Cloud Build to HTTP POST the build information to a webhook.

  3. C

    Use Stackdriver Logging to create a logs-based metric from the Cloud Build logs. Create an Alert with a Webhook notification type.

  4. D

    Create a Cloud Pub/Sub push subscription to the Cloud Build cloud-builds PubSub topic to HTTP POST the build information to a webhook.

Show answer and explanation

Correct answer: D

Explanation

https://cloud.google.com/pubsub/docs/push
https://cloud.google.com/build/docs/subscribe-build-notifications

Question 3 Single choice

You are leading a DevOps project for your organization. The DevOps team is responsible for managing the service infrastructure and being on-call for incidents. The Software Development team is responsible for

writing, submitting, and reviewing code. Neither team has any published SLOs. You want to design a new joint-ownership model for a service between the DevOps team and the Software Development team.

Which responsibilities should be assigned to each team in the new joint-ownership model?

  1. A

    DevOps team responsibilitiesManage the service infrastructureBe on-call for incidentsPerform code reviewsSoftware Development team responsibilitiesSubmit code to be reviewed by the DevOps teamPublish the SLOs that the DevOps team must meet

  2. B

    DevOps team responsibilitiesManage the service infrastructurePerform code reviewsSoftware Development team responsibilitiesSubmit code to be reviewed by the DevOps teamBe on-call for incidentsPublish the SLOs that the DevOps team must meet

  3. C

    DevOps team responsibilitiesShared responsibilities for code reviewsSoftware Development team responsibilitiesManage the service infrastructureBe on-call for incidents on a rotation basisAdopt and publish SLOs for the serviceSubmit code to be reviewed

  4. D

    DevOps team responsibilitiesManage the service infrastructureBe on-call for incidentsSoftware Development team responsibilitiesAdopt and publish SLOs for the serviceSubmit code to be reviewedShared responsibilities for code reviews

Show answer and explanation

Correct answer: D

Question 4 Single choice

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?

  1. A

    Use A/B testing with blue/green deployment.

  2. B

    Use canary testing with continuous deployment.

  3. C

    Use canary testing with rolling updates deployment.

  4. D

    Use shadow testing with continuous deployment.

Show answer and explanation

Correct answer: C

Question 5 Single choice

You are running a web application that connects to an AlloyDB cluster by using a private IP address in your default VPC. You need to run a database schema migration in your CI/CD pipeline by using Cloud Build before deploying a new version of your application. You want to follow Google-recommended security practices.

What should you do?

  1. A

    Set up a Cloud Build private pool to access the database through a static external IP address.
    Configure the database to only allow connections from this IP address. Execute the schema migration script in the private pool.

  2. B

    Create a service account that has permission to access the database. Configure Cloud Build to use this service account and execute the schema migration script in a private pool.

  3. C

    Add the database username and encrypted password to the application configuration file. Use these credentials in Cloud Build to execute the schema migration script.

  4. D

    Add the database username and password to Secret Manager. When running the schema migration script, retrieve the username and password from Secret Manager.

Show answer and explanation

Correct answer: B

Question 6 Single choice

You recently noticed that one of your services has exceeded the error budget for the current rolling window period. Your company's product team is about to launch a new feature. You want to follow Site Reliability Engineering (SRE) practices.

What should you do?

  1. A

    Notify the team about the lack of error budget and ensure that all their tests are successful so the launch will not further risk the error budget

  2. B

    Notify the team that their error budget is used up. Negotiate with the team for a launch freeze or tolerate a slightly worse user experience.

  3. C

    Escalate the situation and request additional error budget.

  4. D

    Look through other metrics related to the product and find SLOs with remaining error budget.
    Reallocate the error budgets and allow the feature launch.

Show answer and explanation

Correct answer: D

Question 7 Single choice

Your team has an application built by using a Dockerfile. The build is executed from Cloud Build, and the resulting artifacts are stored in Artifact Registry. Your team is reporting that builds are slow. You need to increase build speed, while following Google-recommended practices.

What should you do?

  1. A

    Use the --cache-from parameter, and point to Artifact Registry. Add the most frequently modified files to the later stages of the build process.

  2. B

    Use the --cache-from parameter, and point to Artifact Registry. Add the most frequently modified files to the earlier stages of the build process.

  3. C

    Cache the container layers of the build process to Cloud Storage. Add the most frequently modified files to the earlier stages of the build process.

  4. D

    Cache the container layers of the build process to Cloud Storage. Add the most frequently modified files to the later stages of the build process.

Show answer and explanation

Correct answer: A

Question 8 Single choice

You are building the CI/CD pipeline for an application deployed to Google Kubernetes Engine (GKE). The application is deployed by using a Kubernetes Deployment, Service, and Ingress. The application team asked you to deploy the application by using the blue/green deployment methodology. You need to implement the rollback actions.

What should you do?

  1. A

    Run the kubectl rollout undo command.

  2. B

    Delete the new container image, and delete the running Pods.

  3. C

    Update the Kubernetes Service to point to the previous Kubernetes Deployment.

  4. D

    Scale the new Kubernetes Deployment to zero.

Show answer and explanation

Correct answer: C

Explanation

The point of using blue/green deployment is to have both blue & green versions deployed, and we chose the active one at service level, so rollback should only consist of updating the service to serve the other version.

Question 9 Single choice

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?

  1. 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.

  2. 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.

  3. 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.

  4. 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 and explanation

Correct answer: A

Question 10 Single choice

You have a set of applications running on a Google Kubernetes Engine (GKE) cluster, and you are using Stackdriver Kubernetes Engine Monitoring. You are bringing a new containerized application required by your company into production. This application is written by a third party and cannot be modified or reconfigured. The application writes its log information to /var/log/app_messages.log, and you want to send these log entries to Stackdriver Logging.

What should you do?

  1. A

    Use the default Stackdriver Kubernetes Engine Monitoring agent configuration.

  2. B

    Deploy a Fluentd daemonset to GKE. Then create a customized input and output configuration to tail the log file in the application's pods and write to Stackdriver Logging.

  3. C

    Install Kubernetes on Google Compute Engine (GCE) and redeploy your applications. Then customize the built-in Stackdriver Logging configuration to tail the log file in the application's pods and write to Stackdriver Logging.

  4. D

    Write a script to tail the log file within the pod and write entries to standard output. Run the script as a sidecar container with the application's pod. Configure a shared volume between the containers to allow the script to have read access to /var/log in the application container.

Show answer and explanation

Correct answer: B

Explanation

References:
https://cloud.google.com/solutions/customizing-stackdriver-logs-fluentd