ExamGecko
Home Home / Google / Professional Cloud Developer

Google Professional Cloud Developer Practice Test - Questions Answers, Page 25

Question list
Search
Search

List of questions

Search

Related questions











You have deployed a Java application to Cloud Run. Your application requires access to a database hosted on Cloud SQL Due to regulatory requirements: your connection to the Cloud SQL instance must use its internal IP address. How should you configure the connectivity while following Google-recommended best practices'?

A.
Configure your Cloud Run service with a Cloud SQL connection.
A.
Configure your Cloud Run service with a Cloud SQL connection.
Answers
B.
Configure your Cloud Run service to use a Serverless VPC Access connector
B.
Configure your Cloud Run service to use a Serverless VPC Access connector
Answers
C.
Configure your application to use the Cloud SQL Java connector
C.
Configure your application to use the Cloud SQL Java connector
Answers
D.
Configure your application to connect to an instance of the Cloud SQL Auth proxy
D.
Configure your application to connect to an instance of the Cloud SQL Auth proxy
Answers
Suggested answer: A

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?

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.
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.
Answers
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.
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.
Answers
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.
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.
Answers
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.
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.
Answers
Suggested answer: A

Your team recently deployed an application on Google Kubernetes Engine (GKE). You are monitoring your application and want to be alerted when the average memory consumption of your containers is under 20% or above 80% How should you configure the alerts?

A.
Create a Cloud Function that consumes the Monitoring API. Create a schedule to trigger the Cloud Function hourly and alert you if the average memory consumption is outside the defined range
A.
Create a Cloud Function that consumes the Monitoring API. Create a schedule to trigger the Cloud Function hourly and alert you if the average memory consumption is outside the defined range
Answers
B.
In Cloud Monitoring, create an alerting policy to notify you if the average memory consumption is outside the defined range
B.
In Cloud Monitoring, create an alerting policy to notify you if the average memory consumption is outside the defined range
Answers
C.
Create a Cloud Function that runs on a schedule, executes kubect1 top on all the workloads on the cluster, and sends an email alert if the average memory consumption is outside the defined range
C.
Create a Cloud Function that runs on a schedule, executes kubect1 top on all the workloads on the cluster, and sends an email alert if the average memory consumption is outside the defined range
Answers
D.
Write a script that pulls the memory consumption of the instance at the OS level and sends an email alert if the average memory consumption is outside the defined range
D.
Write a script that pulls the memory consumption of the instance at the OS level and sends an email alert if the average memory consumption is outside the defined range
Answers
Suggested answer: B

You are developing a new application. You want the application to be triggered only when a given file is updated in your Cloud Storage bucket. Your trigger might change, so your process must support different types of triggers. You want the configuration to be simple so that multiple team members can update the triggers in the future. What should you do?

A.
Create an Eventarc trigger that monitors your Cloud Storage bucket for a specific filename, and set the target as Cloud Run.
A.
Create an Eventarc trigger that monitors your Cloud Storage bucket for a specific filename, and set the target as Cloud Run.
Answers
B.
Configure Cloud Storage events to be sent to Pub/Sub, and use Pub/Sub events to trigger a Cloud Build job that executes your application.
B.
Configure Cloud Storage events to be sent to Pub/Sub, and use Pub/Sub events to trigger a Cloud Build job that executes your application.
Answers
C.
Configure a Firebase function that executes your application and is triggered when an object is updated in Cloud Storage.
C.
Configure a Firebase function that executes your application and is triggered when an object is updated in Cloud Storage.
Answers
D.
Configure a Cloud Function that executes your application and is triggered when an object is updated in Cloud Storage.
D.
Configure a Cloud Function that executes your application and is triggered when an object is updated in Cloud Storage.
Answers
Suggested answer: C

You are developing a flower ordering application Currently you have three microservices.

* Order Service (receives the orders).

* Order Fulfillment Service (processes the orders).

* Notification Service (notifies the customer when the order is filled).

You need to determine how the services will communicate with each other. You want incoming orders to be processed quickly and you need to collect order information for fulfillment. You also want to make sure orders are not lost between your services and are able to communicate asynchronously. How should the requests be processed?

A.
A.
Answers
B.
B.
Answers
C.
C.
Answers
D.
D.
Answers
Suggested answer: A

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?

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.
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.
Answers
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.
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.
Answers
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.
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.
Answers
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.
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.
Answers
Suggested answer: C

You are developing an event-driven application. You have created a topic to receive messages sent to Pub/Sub. You want those messages to be processed in real time. You need the application to be independent from any other system and only incur compute costs when new messages arrive. You want to configure the simplest and most efficient architecture What should you do?

A.
Deploy your code on Cloud Functions. Use a Pub/Sub trigger to invoke the Cloud Function. Use the Pub/Sub API to create a pull subscription to the Pub/Sub topic and read messages from it.
A.
Deploy your code on Cloud Functions. Use a Pub/Sub trigger to invoke the Cloud Function. Use the Pub/Sub API to create a pull subscription to the Pub/Sub topic and read messages from it.
Answers
B.
Deploy your code on Cloud Functions. Use a Pub/Sub trigger to handle new messages in the topic.
B.
Deploy your code on Cloud Functions. Use a Pub/Sub trigger to handle new messages in the topic.
Answers
C.
Deploy the application on Google Kubernetes Engine. Use the Pub/Sub API to create a pull subscription to the Pub/Sub topic and read messages from it
C.
Deploy the application on Google Kubernetes Engine. Use the Pub/Sub API to create a pull subscription to the Pub/Sub topic and read messages from it
Answers
D.
Deploy the application on Compute Engine. Use a Pub/Sub push subscription to process new messages in the topic.
D.
Deploy the application on Compute Engine. Use a Pub/Sub push subscription to process new messages in the topic.
Answers
Suggested answer: B

Explanation:

https://cloud.google.com/functions/docs/calling/pubsub

You are a developer at a large organization Your team uses Git for source code management (SCM). You want to ensure that your team follows Google-recommended best practices to manage code to drive higher rates of software delivery. Which SCM process should your team use?

A.
Each developer commits their code to the main branch before each product release, conducts testing, and rolls back if integration issues are detected.
A.
Each developer commits their code to the main branch before each product release, conducts testing, and rolls back if integration issues are detected.
Answers
B.
Each group of developers copies the repository, commits their changes to their repository, and merges their code into the main repository before each product release.
B.
Each group of developers copies the repository, commits their changes to their repository, and merges their code into the main repository before each product release.
Answers
C.
Each developer creates a branch for their own work, commits their changes to their branch, and merges their code into the main branch daily.
C.
Each developer creates a branch for their own work, commits their changes to their branch, and merges their code into the main branch daily.
Answers
D.
Each group of developers creates a feature branch from the main branch for their work, commits their changes to their branch, and merges their code into the main branch after the change advisory board approves it.
D.
Each group of developers creates a feature branch from the main branch for their work, commits their changes to their branch, and merges their code into the main branch after the change advisory board approves it.
Answers
Suggested answer: D

Explanation:

Use a centralized repository. A centralized repository is a single location where all of your team's code is stored. This makes it easy for everyone to access the latest code, and it also helps to prevent conflicts. Use branches. Branches are a way to create a separate version of the code for development purposes. This allows developers to work on new features or bug fixes without affecting the main branch of the code.

You recently developed an application that monitors a large number of stock prices. You need to configure Pub/Sub to receive a high volume messages and update the current stock price in a single large in-memory database The downstream service needs only the most up-to-date prices in the in-memory database to perform stock trading transactions Each message contains three pieces of information

* Stock symbol

* Stock price

* Timestamp for the update.

How should you set up your Pub/Sub subscription?

A.
Create a pull subscription with both ordering and exactly-once delivery turned off
A.
Create a pull subscription with both ordering and exactly-once delivery turned off
Answers
B.
Create a pull subscription with exactly-once delivery enabled
B.
Create a pull subscription with exactly-once delivery enabled
Answers
C.
Create a push subscription with exactly-once delivery enabled
C.
Create a push subscription with exactly-once delivery enabled
Answers
D.
Create a push subscription with both ordering and exactly-once delivery turned off
D.
Create a push subscription with both ordering and exactly-once delivery turned off
Answers
Suggested answer: C

You are a developer at a large corporation You manage three Google Kubernetes Engine clusters. Your team's developers need to switch from one cluster to another regularly without losing access to their preferred development tools. You want to configure access to these clusters using the fewest number of steps while following Google-recommended best practices. What should you do?

A.
Ask the developers to use Cloud Shell and run gcloud container clusters get-credentials to switch to another cluster.
A.
Ask the developers to use Cloud Shell and run gcloud container clusters get-credentials to switch to another cluster.
Answers
B.
Ask the developers to open three terminals on their workstation and use kubecrt1 config to configure access to each cluster.
B.
Ask the developers to open three terminals on their workstation and use kubecrt1 config to configure access to each cluster.
Answers
C.
Ask the developers to install the gcloud CLI on their workstation and run gcloud container clusters get-credentials to switch to another cluster
C.
Ask the developers to install the gcloud CLI on their workstation and run gcloud container clusters get-credentials to switch to another cluster
Answers
D.
In a configuration file, define the clusters users, and contexts Email the file to the developers and ask them to use kubect1 config to add cluster, user and context details.
D.
In a configuration file, define the clusters users, and contexts Email the file to the developers and ask them to use kubect1 config to add cluster, user and context details.
Answers
Suggested answer: D

Explanation:

https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/

Total 265 questions
Go to page: of 27