Spring Sale Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: pass65

Professional-Cloud-Developer Google Certified Professional - Cloud Developer Questions and Answers

Questions 4

You have a mixture of packaged and internally developed applications hosted on a Compute Engine instance that is running Linux. These applications write log records as text in local files. You want the logs to be written to Cloud Logging. What should you do?

Options:

A.

Pipe the content of the files to the Linux Syslog daemon.

B.

Install a Google version of fluentd on the Compute Engine instance.

C.

Install a Google version of collectd on the Compute Engine instance.

D.

Using cron, schedule a job to copy the log files to Cloud Storage once a day.

Buy Now
Questions 5

For this question, refer to the HipLocal case study.

A recent security audit discovers that HipLocal’s database credentials for their Compute Engine-hosted MySQL databases are stored in plain text on persistent disks. HipLocal needs to reduce the risk of these credentials being stolen. What should they do?

Options:

A.

Create a service account and download its key. Use the key to authenticate to Cloud Key Management Service (KMS) to obtain the database credentials.

B.

Create a service account and download its key. Use the key to authenticate to Cloud Key Management Service (KMS) to obtain a key used to decrypt the database credentials.

C.

Create a service account and grant it the roles/iam.serviceAccountUser role. Impersonate as this account and authenticate using the Cloud SQL Proxy.

D.

Grant the roles/secretmanager.secretAccessor role to the Compute Engine service account. Store and access the database credentials with the Secret Manager API.

Buy Now
Questions 6

Which service should HipLocal use to enable access to internal apps?

Options:

A.

Cloud VPN

B.

Cloud Armor

C.

Virtual Private Cloud

D.

Cloud Identity-Aware Proxy

Buy Now
Questions 7

HipLocal ' s.net-based auth service fails under intermittent load.

What should they do?

Options:

A.

Use App Engine for autoscaling.

B.

Use Cloud Functions for autoscaling.

C.

Use a Compute Engine cluster for the service.

D.

Use a dedicated Compute Engine virtual machine instance for the service.

Buy Now
Questions 8

HipLocal has connected their Hadoop infrastructure to GCP using Cloud Interconnect in order to query data stored on persistent disks.

Which IP strategy should they use?

Options:

A.

Create manual subnets.

B.

Create an auto mode subnet.

C.

Create multiple peered VPCs.

D.

Provision a single instance for NAT.

Buy Now
Questions 9

For this question, refer to the HipLocal case study.

HipLocal ' s application uses Cloud Client Libraries to interact with Google Cloud. HipLocal needs to configure authentication and authorization in the Cloud Client Libraries to implement least privileged access for the application. What should they do?

Options:

A.

Create an API key. Use the API key to interact with Google Cloud.

B.

Use the default compute service account to interact with Google Cloud.

C.

Create a service account for the applicatio n. Export and deploy the private key for the application. Use the service account to interact with Google Cloud.

D.

Create a service account for the application and for each Google Cloud API used by the application. Export and deploy the private keys used by the application. Use the service account with one Google Cloud API to interact with Google Cloud.

Buy Now
Questions 10

HipLocal ' s APIs are showing occasional failures, but they cannot find a pattern. They want to collect some

metrics to help them troubleshoot.

What should they do?

Options:

A.

Take frequent snapshots of all of the VMs.

B.

Install the Stackdriver Logging agent on the VMs.

C.

Install the Stackdriver Monitoring agent on the VMs.

D.

Use Stackdriver Trace to look for performance bottlenecks.

Buy Now
Questions 11

For this question, refer to the HipLocal case study.

HipLocal is expanding into new locations. They must capture additional data each time the application is launched in a new European country. This is causing delays in the development process due to constant schema changes and a lack of environments for conducting testing on the application changes. How should they resolve the issue while meeting the business requirements?

Options:

A.

Create new Cloud SQL instances in Europe and North America for testing and deployment. Provide developers with local MySQL instances to conduct testing on the application changes.

B.

Migrate data to Bigtable. Instruct the development teams to use the Cloud SDK to emulate a local Bigtable development environment.

C.

Move from Cloud SQL to MySQL hosted on Compute Engine. Replicate hosts across regions in the Americas and Europe. Provide developers with local MySQL instances to conduct testing on the application changes.

D.

Migrate data to Firestore in Native mode and set up instan

Buy Now
Questions 12

For this question, refer to the HipLocal case study.

How should HipLocal redesign their architecture to ensure that the application scales to support a large increase in users?

Options:

A.

Use Google Kubernetes Engine (GKE) to run the application as a microservice. Run the MySQL database on a dedicated GKE node.

B.

Use multiple Compute Engine instances to run MySQL to store state information. Use a Google Cloud-managed load balancer to distribute the load between instances. Use managed instance groups for scaling.

C.

Use Memorystore to store session information and Cloud SQL to store state information. Use a Google Cloud-managed load balancer to distribute the load between instances. Use managed instance groups for scaling.

D.

Use a Cloud Storage bucket to serve the application as a static website, and use another Cloud St orage bucket to store user state information.

Buy Now
Questions 13

In order to meet their business requirements, how should HipLocal store their application state?

Options:

A.

Use local SSDs to store state.

B.

Put a memcache layer in front of MySQL.

C.

Move the state storage to Cloud Spanner.

D.

Replace the MySQL instance with Cloud SQL.

Buy Now
Questions 14

Which database should HipLocal use for storing user activity?

Options:

A.

BigQuery

B.

Cloud SQL

C.

Cloud Spanner

D.

Cloud Datastore

Buy Now
Questions 15

For this question, refer to the HipLocal case study.

How should HipLocal increase their API development speed while continuing to provide the QA team with a stable testing environment that meets feature requirements?

Options:

A.

Include unit tests in their code, and prevent deployments to QA until all tests have a passing status.

B.

Include performance tests in their code, and prevent deployments to QA until all tests have a passing status.

C.

Create health checks for the QA environment, and redeploy the APIs at a later time if the environment is unhealthy.

D.

Redeploy the APIs to App Engine using Traffic Splitting. Do not move QA traffic to the new versions if errors are found.

Buy Now
Questions 16

You are running a web application on Google Kubernetes Engine that you inherited. You want to determine whether the application is using libraries with known vulnerabilities or is vulnerable to XSS attacks. Which service should you use?

Options:

A.

Google Cloud Armor

B.

Debugger

C.

Web Security Scanner

D.

Error Reporting

Buy Now
Questions 17

You are a developer at a social media company The company runs their social media website on-premises and uses MySQL as a backend to store user profiles and user posts. Your company plans to migrate to Google Cloud, and your team will migrate user profile information to Firestore. You are tasked with designing the Firestore collections. What should you do?

Options:

A.

Create one root collection for user profiles, and store each user ' s post as a nested list in the user profile document.

B.

Create one root collection for user profiles, and create one root collection for user posts.

C.

Create one root collection for user profiles, and create one subcollection for each user ' s posts.

D.

Create one root collection for user posts, and create one subcollection for each user ' s profile

Buy Now
Questions 18

You are a lead developer working on a new retail system that runs on Cloud Run and Firestore. A web UI requirement is for the user to be able to browse through alt products. A few months after go-live, you notice that Cloud Run instances are terminated with HTTP 500: Container instances are exceeding memory limits errors during busy times

This error coincides with spikes in the number of Firestore queries

You need to prevent Cloud Run from crashing and decrease the number of Firestore queries. You want to use a solution that optimizes system performance What should you do?

Options:

A.

Create a custom jndex over the products

B.

Modify the query that returns the product list using cursors with limits

C.

Modify the Cloud Run configuration to increase the memory limits

D.

Modify the query that returns the product list using integer offsets

Buy Now
Questions 19

You are developing a microservice-based application that will run on Google Kubernetes Engine (GKE). Some of the services need to access different Google Cloud APIs. How should you set up authentication of these services in the cluster following Google-recommended best practices? (Choose two.)

Options:

A.

Use the service account attached to the GKE node.

B.

Enable Workload Identity in the cluster via the gcloud command-line tool.

C.

Access the Google service account keys from a secret management service.

D.

Store the Google service account keys in a central secret management service.

E.

Use gcloud to bind the Kubernetes service account and the Google service account using roles/iam.workloadIdentity.

Buy Now
Questions 20

You have decided to migrate your Compute Engine application to Google Kubernetes Engine. You need to build a container image and push it to Artifact Registry using Cloud Build. What should you do? (Choose two.)

A)

Run gcloud builds submit in the directory that contains the application source code.

B)

Run gcloud run deploy app-name --image gcr.io/$PROJECT_ID/app-name in the directory that contains the application source code.

C)

Run gcloud container images add-tag gcr.io/$PROJECT_ID/app-name gcr.io/$PROJECT_ID/app-name:latest in the directory that contains the application source code.

D)

In the application source directory, create a file named cloudbuild.yaml that contains the following contents:

Professional-Cloud-Developer Question 20

E)

In the application source directory, create a file named cloudbuild.yaml that contains the following contents:

Professional-Cloud-Developer Question 20

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

E.

Option E

Buy Now
Questions 21

Your company’s corporate policy states that there must be a copyright comment at the very beginning of all source files. You want to write a custom step in Cloud Build that is triggered by each source commit. You need the trigger to validate that the source contains a copyright and add one for subsequent steps if not there. What should you do?

Options:

A.

Build a new Docker container that examines the files in /workspace and then checks and adds a copyright for each source file. Changed files are explicitly committed back to the source repository.

B.

Build a new Docker container that examines the files in /workspace and then checks and adds a copyright for each source file. Changed files do not need to be committed back to the source repository.

C.

Build a new Docker container that examines the files in a Cloud Storage bucket and then checks and adds a copyright for each source file. Changed files are written back to the Cloud Storage bucket.

D.

Build a new Docker container that examines the files in a Cloud Storage bucket and then checks and adds a copyright for each source file. Changed files are explicitly committed back to the source repository.

Buy Now
Questions 22

You need to deploy an internet-facing microservices application to Google Kubernetes Engine (GKE). You want to validate new features using the A/B testing method. You have the following requirements for deploying new container image releases

• There is no downtime when new container images are deployed.

• New production releases are tested and verified using a subset of production users.

What should you do?

Options:

A.

1 Configure your Cl/CD pipeline to update the Deployment manifest file by replacing the container version with the latest version.

2 Recreate the Pods in your cluster by applying the Deployment manifest file.

3 Validate the application ' s performance by comparing its functionality with the previous release version and roll back if an issue arises.

B.

1 install the Anthos Service Mesh on your GKE cluster.

2 Create two Deployments on the GKE cluster and label them with different version names.

3 Create a VirtualService with a routing rule to send a small percentage of traffic to the Deployment that references the new version of the application.

C.

1 Create a second namespace on GKE for the new release version.

2 Create a Deployment configuration for the second namespace with the desired number of Pods.

3 Deploy new container versions in the second namespace.

4 Update the ingress configuration to route traffic to the namespace with the new container versions.

D.

1. Implement a rolling update pattern by replacing the Pods gradually with the new release versify.

2 Validate the application ' s performance for the new subset of users during the rollout and roll back if an issue arises.

Buy Now
Questions 23

Your team is developing unit tests for Cloud Function code. The code is stored in a Cloud Source Repositories repository. You are responsible for implementing the tests. Only a specific service account has the necessary permissions to deploy the code to Cloud Functions. You want to ensure that the code cannot be deployed without first passing the tests. How should you configure the unit testing process?

Options:

A.

Configure Cloud Build to deploy the Cloud Function. If the code passes the tests, a deployment approval is sent to you.

B.

Configure Cloud Build to deploy the Cloud Function, using the specific service account as the build agent. Run the unit tests after successful deployment.

C.

Configure Cloud Build to run the unit tests. If the code passes the tests, the developer deploys the Cloud Function.

D.

Configure Cloud Build to run the unit tests, using the specific service account as the build agent. If the code passes the tests, Cloud Build deploys the Cloud Function.

Buy Now
Questions 24

Your development team has been asked to refactor an existing monolithic application into a set of composable microservices. Which design aspects should you implement for the new application? (Choose two.)

Options:

A.

Develop the microservice code in the same programming language used by the microservice caller.

B.

Create an API contract agreement between the microservice implementation and microservice caller.

C.

Require asynchronous communications between all microservice implementations and microservice callers.

D.

Ensure that sufficient instances of the microservice are running to accommodate the performance requirements.

E.

Implement a versioning scheme to permit future changes that could be incompatible with the current interface.

Buy Now
Questions 25

Your analytics system executes queries against a BigQuery dataset. The SQL query is executed in batch and passes the contents of a SQL file to the BigQuery CLI. Then it redirects the BigQuery CLI output to another process. However, you are getting a permission error from the BigQuery CLI when the queries are executed. You want to resolve the issue. What should you do?

Options:

A.

Grant the service account BigQuery Data Viewer and BigQuery Job User roles.

B.

Grant the service account BigQuery Data Editor and BigQuery Data Viewer roles.

C.

Create a view in BigQuery from the SQL query and SELECT* from the view in the CLI.

D.

Create a new dataset in BigQuery, and copy the source table to the new dataset Query the new dataset and table from the CLI.

Buy Now
Questions 26

You are developing an application that consists of several microservices running in a Google Kubernetes Engine cluster. One microservice needs to connect to a third-party database running on-premises. You need to store credentials to the database and ensure that these credentials can be rotated while following security best practices. What should you do?

Options:

A.

Store the credentials in a sidecar container proxy, and use it to connect to the third-party database.

B.

Configure a service mesh to allow or restrict traffic from the Pods in your microservice to the database.

C.

Store the credentials in an encrypted volume mount, and associate a Persistent Volume Claim with the client Pod.

D.

Store the credentials as a Kubernetes Secret, and use the Cloud Key Management Service plugin to handle encryption and decryption.

Buy Now
Questions 27

You are using Cloud Build build to promote a Docker image to Development, Test, and Production environments. You need to ensure that the same Docker image is deployed to each of these environments. How should you identify the Docker image in your build?

Options:

A.

Use the latest Docker image tag.

B.

Use a unique Docker image name.

C.

Use the digest of the Docker image.

D.

Use a semantic version Docker image tag.

Buy Now
Questions 28

Your existing application keeps user state information in a single MySQL database. This state information is

very user-specific and depends heavily on how long a user has been using an application. The MySQL

database is causing challenges to maintain and enhance the schema for various users.

Which storage option should you choose?

Options:

A.

Cloud SQL

B.

Cloud Storage

C.

Cloud Spanner

D.

Cloud Datastore/Firestore

Buy Now
Questions 29

You are trying to connect to your Google Kubernetes Engine (GKE) cluster using kubectl from Cloud Shell. You have deployed your GKE cluster with a public endpoint. From Cloud Shell, you run the following command:

Professional-Cloud-Developer Question 29

You notice that the kubectl commands time out without returning an error message. What is the most likely cause of this issue?

Options:

A.

Your user account does not have privileges to interact with the cluster using kubectl.

B.

Your Cloud Shell external IP address is not part of the authorized networks of the cluster.

C.

The Cloud Shell is not part of the same VPC as the GKE cluster.

D.

A VPC firewall is blocking access to the cluster’s endpoint.

Buy Now
Questions 30

You have recently instrumented a new application with OpenTelemetry, and you want to check the latency of your application requests in Trace. You want to ensure that a specific request is always traced. What should you do?

Options:

A.

Wait 10 minutes, then verify that Trace captures those types of requests automatically.

B.

Write a custom script that sends this type of request repeatedly from your dev project.

C.

Use the Trace API to apply custom attributes to the trace.

D.

Add the X-Cloud-Trace-Context header to the request with the appropriate parameters.

Buy Now
Questions 31

You are a developer working with the CI/CD team to troubleshoot a new feature that your team introduced. The CI/CD team used HashiCorp Packer to create a new Compute Engine image from your development branch. The image was successfully built, but is not booting up. You need to investigate the issue with the CI/CD team. What should you do?

Options:

A.

Create a new feature branch, and ask the build team to rebuild the image.

B.

Shut down the deployed virtual machine, export the disk, and then mount the disk locally to access the boot logs.

C.

Install Packer locally, build the Compute Engine image locally, and then run it in your personal Google Cloud project.

D.

Check Compute Engine OS logs using the serial port, and check the Cloud Logging logs to confirm access to the serial port.

Buy Now
Questions 32

You are tasked with using C++ to build and deploy a microservice for an application hosted on Google Cloud. The code needs to be containerized and use several custom software libraries that your team has built. You do not want to maintain the underlying infrastructure of the application How should you deploy the microservice?

Options:

A.

Use Cloud Functions to deploy the microservice.

B.

Use Cloud Build to create the container, and deploy it on Cloud Run.

C.

Use Cloud Shell to containerize your microservice. and deploy it on GKE Standard.

D.

Use Cloud Shell to containerize your microservice. and deploy it on a Container-Optimized OS Compute Engine instance.

Buy Now
Questions 33

Your team is developing an application in Google Cloud that executes with user identities maintained by Cloud Identity. Each of your application’s users will have an associated Pub/Sub topic to which messages are published, and a Pub/Sub subscription where the same user will retrieve published messages. You need to ensure that only authorized users can publish and subscribe to their own specific Pub/Sub topic and subscription. What should you do?

Professional-Cloud-Developer Question 33

Options:

A.

Bind the user identity to the pubsub.publisher and pubsub.subscriber roles at the resource level.

B.

Grant the user identity the pubsub.publisher and pubsub.subscriber roles at the project level.

C.

Grant the user identity a custom role that contains the pubsub.topics.create and pubsub.subscriptions.create permissions.

D.

Configure the application to run as a service account that has the pubsub.publisher and pubsub.subscriber roles.

Buy Now
Questions 34

You are planning to deploy your application in a Google Kubernetes Engine (GKE) cluster The application

exposes an HTTP-based health check at /healthz. You want to use this health check endpoint to determine whether traffic should be routed to the pod by the load balancer.

Which code snippet should you include in your Pod configuration?

Professional-Cloud-Developer Question 34

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 35

You are planning to migrate a MySQL database to the managed Cloud SQL database for Google Cloud. You have Compute Engine virtual machine instances that will connect with this Cloud SQL instance. You do not want to whitelist IPs for the Compute Engine instances to be able to access Cloud SQL.

What should you do?

Options:

A.

Enable private IP for the Cloud SQL instance.

B.

Whitelist a project to access Cloud SQL, and add Compute Engine instances in the whitelisted project.

C.

Create a role in Cloud SQL that allows access to the database from external instances, and assign the

Compute Engine instances to that role.

D.

Create a CloudSQL instance on one project. Create Compute engine instances in a different project.

Create a VPN between these two projects to allow internal access to CloudSQL.

Buy Now
Questions 36

Your company ' s development teams want to use Cloud Build in their projects to build and push Docker images

to Container Registry. The operations team requires all Docker images to be published to a centralized,

securely managed Docker registry that the operations team manages.

What should you do?

Options:

A.

Use Container Registry to create a registry in each development team ' s project. Configure the Cloud Build

build to push the Docker image to the project ' s registry. Grant the operations team access to each

development team ' s registry.

B.

Create a separate project for the operations team that has Container Registry configured. Assign

appropriate permissions to the Cloud Build service account in each developer team ' s project to allow

access to the operation team ' s registry.

C.

Create a separate project for the operations team that has Container Registry configured. Create a Service

Account for each development team and assign the appropriate permissions to allow it access to the

operations team ' s registry. Store the service account key file in the source code repository and use it to

authenticate against the operations team ' s registry.

D.

Create a separate project for the operations team that has the open source Docker Registry deployed on a

Compute Engine virtual machine instance. Create a username and password for each development team.

Store the username and password in the source code repository and use it to authenticate against the

operations team ' s Docker registry.

Buy Now
Questions 37

HipLocal wants to improve the resilience of their MySQL deployment, while also meeting their business and technical requirements.

Which configuration should they choose?

Options:

A.

Use the current single instance MySQL on Compute Engine and several read-only MySQL servers on

Compute Engine.

B.

Use the current single instance MySQL on Compute Engine, and replicate the data to Cloud SQL in an

external master configuration.

C.

Replace the current single instance MySQL instance with Cloud SQL, and configure high availability.

D.

Replace the current single instance MySQL instance with Cloud SQL, and Google provides redundancy

without further configuration.

Buy Now
Questions 38

For this question refer to the HipLocal case study.

HipLocal wants to reduce the latency of their services for users in global locations. They have created read replicas of their database in locations where their users reside and configured their service to read traffic using those replicas. How should they further reduce latency for all database interactions with the least amount of effort?

Options:

A.

Migrate the database to Bigtable and use it to serve all global user traffic.

B.

Migrate the database to Cloud Spanner and use it to serve all global user traffic.

C.

Migrate the database to Firestore in Datastore mode and use it to serve a ll global user traffic.

D.

Migrate the services to Google Kubernetes Engine and use a load balancer service to better scale the application.

Buy Now
Questions 39

In order for HipLocal to store application state and meet their stated business requirements, which database service should they migrate to?

Options:

A.

Cloud Spanner

B.

Cloud Datastore

C.

Cloud Memorystore as a cache

D.

Separate Cloud SQL clusters for each region

Buy Now
Questions 40

Which service should HipLocal use for their public APIs?

Options:

A.

Cloud Armor

B.

Cloud Functions

C.

Cloud Endpoints

D.

Shielded Virtual Machines

Buy Now
Questions 41

For this question, refer to the HipLocal case study.

Which Google Cloud product addresses HipLocal’s business requirements for service level indicators and objectives?

Options:

A.

Cloud Profiler

B.

Cloud Monitoring

C.

Cloud Trace

D.

Cloud Logging

Buy Now
Questions 42

HipLocal is configuring their access controls.

Which firewall configuration should they implement?

Options:

A.

Block all traffic on port 443.

B.

Allow all traffic into the network.

C.

Allow traffic on port 443 for a specific tag.

D.

Allow all traffic on port 443 into the network.

Buy Now
Questions 43

HipLocal’s data science team wants to analyze user reviews.

How should they prepare the data?

Options:

A.

Use the Cloud Data Loss Prevention API for redaction of the review dataset.

B.

Use the Cloud Data Loss Prevention API for de-identification of the review dataset.

C.

Use the Cloud Natural Language Processing API for redaction of the review dataset.

D.

Use the Cloud Natural Language Processing API for de-identification of the review dataset.

Buy Now
Questions 44

HipLocal wants to reduce the number of on-call engineers and eliminate manual scaling.

Which two services should they choose? (Choose two.)

Options:

A.

Use Google App Engine services.

B.

Use serverless Google Cloud Functions.

C.

Use Knative to build and deploy serverless applications.

D.

Use Google Kubernetes Engine for automated deployments.

E.

Use a large Google Compute Engine cluster for deployments.

Buy Now
Questions 45

You work for an organization that manages an ecommerce site. Your application is deployed behind a global HTTP(S) load balancer. You need to test a new product recommendation algorithm. You plan to use A/B testing to determine the new algorithm’s effect on sales in a randomized way. How should you test this feature?

Options:

A.

Split traffic between versions using weights.

B.

Enable the new recommendation feature flag on a single instance.

C.

Mirror traffic to the new version of your application.

D.

Use HTTP header-based routing.

Buy Now
Questions 46

Your application takes an input from a user and publishes it to the user ' s contacts. This input is stored in a

table in Cloud Spanner. Your application is more sensitive to latency and less sensitive to consistency.

How should you perform reads from Cloud Spanner for this application?

Options:

A.

Perform Read-Only transactions.

B.

Perform stale reads using single-read methods.

C.

Perform strong reads using single-read methods.

D.

Perform stale reads using read-write transactions.

Buy Now
Questions 47

You are using Cloud Build for your CI/CD pipeline to complete several tasks, including copying certain files to Compute Engine virtual machines. Your pipeline requires a flat file that is generated in one builder in the pipeline to be accessible by subsequent builders in the same pipeline. How should you store the file so that all the builders in the pipeline can access it?

Options:

A.

Store and retrieve the file contents using Compute Engine instance metadata.

B.

Output the file contents to a file in /workspace. Read from the same /workspace file in the subsequent build step.

C.

Use gsutil to output the file contents to a Cloud Storage object. Read from the same object in the subsequent build step.

D.

Add a build argument that runs an HTTP POST via curl to a separate web server to persist the value in one builder. Use an HTTP GET via curl from the subsequent build step to read the value.

Buy Now
Questions 48

You need to migrate a standalone Java application running in an on-premises Linux virtual machine (VM) to Google Cloud in a cost-effective manner. You decide not to take the lift-and-shift approach, and instead you plan to modernize the application by converting it to a container. How should you accomplish this task?

Options:

A.

Use Migrate for Anthos to migrate the VM to your Google Kubernetes Engine (GKE) cluster as a container.

B.

Export the VM as a raw disk and import it as an image. Create a Compute Engine instance from the Imported image.

C.

Use Migrate for Compute Engine to migrate the VM to a Compute Engine instance, and use Cloud Build to convert it to a container.

D.

Use Jib to build a Docker image from your source code, and upload it to Artifact Registry. Deploy the application in a GKE cluster, and test the application.

Buy Now
Questions 49

Your team is developing a Cloud Function triggered by Cloud Storage Events. You want to accelerate testing and development of your Cloud Function while following Google-recommended best practices. What should you do?

Options:

A.

Install the Functions Frameworks library, and configure the Cloud Function on localhost. Make a copy of the function, and make edits to the new version Test the new version using cur1.

B.

Make a copy of the Cloud Function, and rewrite the code to be HTTP-triggered Edit and test the new version

by triggering the HTTP endpoint. Send mock requests to the new function to evaluate the functionality.

C.

Make a copy of the Cloud Function in the Google Cloud Console Use the Cloud console ' s in-line editor to

make source code changes to the new function Modify your web application to call the new function and test the new version in production.

D.

Create a new Cloud Function that is triggered when Cloud Audit Logs detects the

cloudfunctions. functions. sourceCodeSet operation in the original Cloud Function Send mock

requests to the new function to evaluate the functionality.

Buy Now
Questions 50

You have an application running in App Engine. Your application is instrumented with Stackdriver Trace. The /product-details request reports details about four known unique products at /sku-details as shown below. You want to reduce the time it takes for the request to complete. What should you do?

Professional-Cloud-Developer Question 50

Options:

A.

Increase the size of the instance class.

B.

Change the Persistent Disk type to SSD.

C.

Change /product-details to perform the requests in parallel.

D.

Store the /sku-details information in a database, and replace the webservice call with a database query.

Buy Now
Questions 51

You are working on a new application that is deployed on Cloud Run and uses Cloud Functions Each time new features are added, new Cloud Functions and Cloud Run services are deployed You use ENV variables to keep track of the services and enable interservice communication but the maintenance of the ENV variables has become difficult. You want to implement dynamic discovery in a scalable way. What should you do?

Options:

A.

Create a Service Directory Namespace Use API calls to register the services during deployment, and query during runtime.

B.

Configure your microservices to use the Cloud Run Admin and Cloud Functions APIs to query for deployed Cloud Run services and Cloud Functions in the Google Cloud project.

C.

Deploy Hashicorp Consul on a single Compute Engine Instance Register the services with Consul during deployment and query during runtime

D.

Rename the Cloud Functions and Cloud Run services endpoints using a well-documented naming

convention

Buy Now
Questions 52

You want to create “fully baked” or “golden” Compute Engine images for your application. You need to bootstrap your application to connect to the appropriate database according to the environment the application is running on (test, staging, production). What should you do?

Options:

A.

Embed the appropriate database connection string in the image. Create a different image for each environment.

B.

When creating the Compute Engine instance, add a tag with the name of the database to be connected. In your application, query the Compute Engine API to pull the tags for the current instance, and use the tag to construct the appropriate database connection string.

C.

When creating the Compute Engine instance, create a metadata item with a key of “DATABASE” and a value for the appropriate database connection string. In your application, read the “DATABASE” environment variable, and use the value to connect to the appropriate database.

D.

When creating the Compute Engine instance, create a metadata item with a key of “DATABASE” and a value for the appropriate database connection string. In your application, query the metadata server for the “DATABASE” value, and use the value to connect to the appropriate database.

Buy Now
Questions 53

You have an on-premises application that authenticates to the Cloud Storage API using a user-managed service account with a user-managed key. The application connects to Cloud Storage using Private Google Access over a Dedicated Interconnect link. You discover that requests from the application to access objects in the Cloud Storage bucket are failing with a 403 Permission Denied error code. What is the likely cause of this issue?

Options:

A.

The folder structure inside the bucket and object paths have changed.

B.

The permissions of the service account’s predefined role have changed.

C.

The service account key has been rotated but not updated on the application server.

D.

The Interconnect link from the on-premises data center to Google Cloud is experiencing a temporary outage.

Buy Now
Questions 54

You are designing a schema for a Cloud Spanner customer database. You want to store a phone number array field in a customer table. You also want to allow users to search customers by phone number. How should you design this schema?

Options:

A.

Create a table named Customers. Add an Array field in a table that will hold phone numbers for the customer.

B.

Create a table named Customers. Create a table named Phones. Add a CustomerId field in the Phones table to find the CustomerId from a phone number.

C.

Create a table named Customers. Add an Array field in a table that will hold phone numbers for the customer. Create a secondary index on the Array field.

D.

Create a table named Customers as a parent table. Create a table named Phones, and interleave this table into the Customer table. Create an index on the phone number field in the Phones table.

Buy Now
Questions 55

You are creating a Google Kubernetes Engine (GKE) cluster and run this command:

Professional-Cloud-Developer Question 55

The command fails with the error :

Professional-Cloud-Developer Question 55

You want to resolve the issue. What should you do?

Options:

A.

Request additional GKE quota is the GCP Console.

B.

Request additional Compute Engine quota in the GCP Console.

C.

Open a support case to request additional GKE quotA.

D.

Decouple services in the cluster, and rewrite new clusters to function with fewer cores.

Buy Now
Questions 56

You need to deploy a new European version of a website hosted on Google Kubernetes Engine. The current and new websites must be accessed via the same HTTP(S) load balancer ' s external IP address, but have different domain names. What should you do?

Options:

A.

Define a new Ingress resource with a host rule matching the new domain

B.

Modify the existing Ingress resource with a host rule matching the new domain

C.

Create a new Service of type LoadBalancer specifying the existing IP address as the loadBalancerIP

D.

Generate a new Ingress resource and specify the existing IP address as the kubernetes.io/ingress.global-static-ip-name annotation value

Buy Now
Questions 57

You are developing an internal application that will allow employees to organize community events within your company. You deployed your application on a single Compute Engine instance. Your company uses Google Workspace (formerly G Suite), and you need to ensure that the company employees can authenticate to the application from anywhere. What should you do?

Options:

A.

Add a public IP address to your instance, and restrict access to the instance using firewall rules. Allow your company’s proxy as the only source IP address.

B.

Add an HTTP(S) load balancer in front of the instance, and set up Identity-Aware Proxy (IAP). Configure the IAP settings to allow your company domain to access the website.

C.

Set up a VPN tunnel between your company network and your instance’s VPC location on Google Cloud. Configure the required firewall rules and routing information to both the on-premises and Google Cloud networks.

D.

Add a public IP address to your instance, and allow traffic from the internet. Generate a random hash, and create a subdomain that includes this hash and points to your instance. Distribute this DNS address to your company’s employees.

Buy Now
Questions 58

Before promoting your new application code to production, you want to conduct testing across a variety of different users. Although this plan is risky, you want to test the new version of the application with production users and you want to control which users are forwarded to the new version of the application based on their operating system. If bugs are discovered in the new version, you want to roll back the newly deployed version of the application as quickly as possible.

What should you do?

Options:

A.

Deploy your application on Cloud Run. Use traffic splitting to direct a subset of user traffic to the new version based on the revisio n tag.

B.

Deploy your application on Google Kubernetes Engine with Anthos Service Mesh. Use traffic splitting to direct a subset of user traffic to the new version based on the user-agent header.

C.

Deploy your application on App Engine. Use traffic splitt ing to direct a subset of user traffic to the new version based on the IP address.

D.

Deploy your application on Compute Engine. Use Traffic Director to direct a subset of user traffic to the new version based on predefined weights.

Buy Now
Questions 59

Your team develops services that run on Google Cloud. You want to process messages sent to a Pub/Sub topic, and then store them. Each message must be processed exactly once to avoid duplication of data and any data conflicts. You need to use the cheapest and most simple solution. What should you do?

Options:

A.

Process the messages with a Dataproc job, and write the output to storage.

B.

Process the messages with a Dataflow streaming pipeline using Apache Beam ' s PubSubIO package, and write the output to storage.

C.

Process the messages with a Cloud Function, and write the results to a BigQuery location where you can run a job to deduplicate the data.

D.

Retrieve the messages with a Dataflow streaming pipeline, store them in Cloud Bigtable, and use another Dataflow streaming pipeline to deduplicate messages.

Buy Now
Exam Name: Google Certified Professional - Cloud Developer
Last Update: Apr 30, 2026
Questions: 265

PDF + Testing Engine

$63.52  $181.49

Testing Engine

$50.57  $144.49
buy now Professional-Cloud-Developer testing engine

PDF (Q&A)

$43.57  $124.49
buy now Professional-Cloud-Developer pdf