google professional-cloud-developer online test

Professional Cloud Developer

What students need to know about the professional-cloud-developer exam

  • Total 138 Questions & Answers

Question 1

You are deploying a single website on App Engine that needs to be accessible via the URL http://www.altostrat.com/.
What should you do?

  • A. Verify domain ownership with Webmaster Central. Create a DNS CNAME record to point to the App Engine canonical name ghs.googlehosted.com.
  • B. Verify domain ownership with Webmaster Central. Define an A record pointing to the single global App Engine IP address.
  • C. Define a mapping in dispatch.yaml to point the domain www.altostrat.com to your App Engine service. Create a DNS CNAME record to point to the App Engine canonical name ghs.googlehosted.com.
  • D. Define a mapping in dispatch.yaml to point the domain www.altostrat.com to your App Engine service. Define an A record pointing to the single global App Engine IP address.
Answer:

A

Explanation:
Reference: https://cloud.google.com/appengine/docs/flexible/dotnet/mapping-custom-domains?hl=fa

Discussions

Question 2

You are creating and running containers across different projects in Google Cloud. The application you are developing
needs to access Google Cloud services from within Google Kubernetes Engine (GKE). What should you do?

  • A. Assign a Google service account to the GKE nodes.
  • B. Use a Google service account to run the Pod with Workload Identity.
  • C. Store the Google service account credentials as a Kubernetes Secret.
  • D. Use a Google service account with GKE role-based access control (RBAC).
Answer:

A

Discussions

Question 3

Your web application is deployed to the corporate intranet. You need to migrate the web application to Google Cloud. The
web application must be available only to company employees and accessible to employees as they travel. You need to
ensure the security and accessibility of the web application while minimizing application changes. What should you do?

  • A. Configure the application to check authentication credentials for each HTTP(S) request to the application.
  • B. Configure Identity-Aware Proxy to allow employees to access the application through its public IP address.
  • C. Configure a Compute Engine instance that requests users to log in to their corporate account. Change the web application DNS to point to the proxy Compute Engine instance. After authenticating, the Compute Engine instance forwards requests to and from the web application.
  • D. Configure a Compute Engine instance that requests users to log in to their corporate account. Change the web application DNS to point to the proxy Compute Engine instance. After authenticating, the Compute Engine issues an HTTP redirect to a public IP address hosting the web application.
Answer:

B

Discussions

Question 4

Your application is running on Compute Engine and is showing sustained failures for a small number of requests. You have
narrowed the cause down to a single Compute Engine instance, but the instance is unresponsive to SSH.
What should you do next?

  • A. Reboot the machine.
  • B. Enable and check the serial port output.
  • C. Delete the machine and create a new one.
  • D. Take a snapshot of the disk and attach it to a new machine.
Answer:

A

Discussions

Question 5

You deployed a new application to Google Kubernetes Engine and are experiencing some performance degradation. Your
logs are being written to Cloud Logging, and you are using a Prometheus sidecar model for capturing metrics. You need to
correlate the metrics and data from the logs to troubleshoot the performance issue and send real-time alerts while minimizing
costs. What should you do?

  • A. Create custom metrics from the Cloud Logging logs, and use Prometheus to import the results using the Cloud Monitoring REST API.
  • B. Export the Cloud Logging logs and the Prometheus metrics to Cloud Bigtable. Run a query to join the results, and analyze in Google Data Studio.
  • C. Export the Cloud Logging logs and stream the Prometheus metrics to BigQuery. Run a recurring query to join the results, and send notifications using Cloud Tasks.
  • D. Export the Prometheus metrics and use Cloud Monitoring to view them as external metrics. Configure Cloud Monitoring to create log-based metrics from the logs, and correlate them with the Prometheus data.
Answer:

D

Explanation:
Reference: https://cloud.google.com/blog/products/operations/troubleshoot-gke-faster-with-monitoring-data-in-your-logs

Discussions

Question 6

You are developing a new application that has the following design requirements:
Creation and changes to the application infrastructure are versioned and auditable.

The application and deployment infrastructure uses Google-managed services as much as possible. The application


runs on a serverless compute platform.
How should you design the applications architecture?

  • A. 1. Store the application and infrastructure source code in a Git repository. 2. Use Cloud Build to deploy the application infrastructure with Terraform. 3. Deploy the application to a Cloud Function as a pipeline step.
  • B. 1. Deploy Jenkins from the Google Cloud Marketplace, and define a continuous integration pipeline in Jenkins. 2. Configure a pipeline step to pull the application source code from a Git repository. 3. Deploy the application source code to App Engine as a pipeline step.
  • C. 1. Create a continuous integration pipeline on Cloud Build, and configure the pipeline to deploy the application infrastructure using Deployment Manager templates. 2. Configure a pipeline step to create a container with the latest application source code. 3. Deploy the container to a Compute Engine instance as a pipeline step.
  • D. 1. Deploy the application infrastructure using gcloud commands. 2. Use Cloud Build to define a continuous integration pipeline for changes to the application source code. 3. Configure a pipeline step to pull the application source code from a Git repository, and create a containerized application. 4. Deploy the new container on Cloud Run as a pipeline step.
Answer:

D

Explanation:
Reference: https://cloud.google.com/docs/ci-cd

Discussions

Question 7

Your company has deployed a new API to App Engine Standard environment. During testing, the API is not behaving as
expected. You want to monitor the application over time to diagnose the problem within the application code without
redeploying the application.
Which tool should you use?

  • A. Stackdriver Trace
  • B. Stackdriver Monitoring
  • C. Stackdriver Debug Snapshots
  • D. Stackdriver Debug Logpoints
Answer:

B

Explanation:
Reference: https://rominirani.com/gcp-stackdriver-tutorial-debug-snapshots-traces-logging-and-logpoints-1ba49e4780e6

Discussions

Question 8

You are deploying your applications on Compute Engine. One of your Compute Engine instances failed to launch. What
should you do? (Choose two.)

  • A. Determine whether your file system is corrupted.
  • B. Access Compute Engine as a different SSH user.
  • C. Troubleshoot firewall rules or routes on an instance.
  • D. Check whether your instance boot disk is completely full.
  • E. Check whether network traffic to or from your instance is being dropped.
Answer:

D E

Explanation:
Reference: https://cloudacademy.com/course/deploying-applications-on-gcp-compute/deploying-applications-and-services-
on-compute-engine/

Discussions

Question 9

You have been tasked with planning the migration of your companys application from on-premises to Google Cloud. Your
companys monolithic application is an ecommerce website. The application will be migrated to microservices deployed on
Google Cloud in stages. The majority of your companys revenue is generated through online sales, so it is important to
minimize risk during the migration. You need to prioritize features and select the first functionality to migrate. What should
you do?

  • A. Migrate the Product catalog, which has integrations to the frontend and product database.
  • B. Migrate Payment processing, which has integrations to the frontend, order database, and third-party payment vendor.
  • C. Migrate Order fulfillment, which has integrations to the order database, inventory system, and third-party shipping vendor.
  • D. Migrate the Shopping cart, which has integrations to the frontend, cart database, inventory system, and payment processing system.
Answer:

A

Discussions

Question 10

Your application is running in multiple Google Kubernetes Engine clusters. It is managed by a Deployment in each cluster.
The Deployment has created multiple replicas of your Pod in each cluster. You want to view the logs sent to stdout for all of
the replicas in your Deployment in all clusters.
Which command should you use?

  • A. kubectl logs [PARAM]
  • B. gcloud logging read [PARAM]
  • C. kubectl exec –it [PARAM] journalctl
  • D. gcloud compute ssh [PARAM] –-command= “sudo journalctl”
Answer:

D

Discussions
To page 2