ExamGecko
Home Home / Google / Professional Cloud Developer

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

Question list
Search
Search

List of questions

Search

Related questions











You are building a mobile application that will store hierarchical data structures in a database. The application will enable users working offline to sync changes when they are back online. A backend service will enrich the data in the database using a service account. The application is expected to be very popular and needs to scale seamlessly and securely. Which database and IAM role should you use?

A.
Use Cloud SQL, and assign the roles/cloudsql.editor role to the service account.
A.
Use Cloud SQL, and assign the roles/cloudsql.editor role to the service account.
Answers
B.
Use Bigtable, and assign the roles/bigtable.viewer role to the service account.
B.
Use Bigtable, and assign the roles/bigtable.viewer role to the service account.
Answers
C.
Use Firestore in Native mode and assign the roles/datastore.user role to the service account.
C.
Use Firestore in Native mode and assign the roles/datastore.user role to the service account.
Answers
D.
Use Firestore in Datastore mode and assign the roles/datastore.viewer role to the service account.
D.
Use Firestore in Datastore mode and assign the roles/datastore.viewer role to the service account.
Answers
Suggested answer: C

Explanation:

https://firebase.google.com/docs/firestore/manage-data/enable-offline

Cloud Firestore supports offline data persistence. This feature caches a copy of the Cloud Firestore data that your app is actively using, so your app can access the data when the device is offline. You can write, read, listen to, and query the cached data. When the device comes back online, Cloud Firestore synchronizes any local changes made by your app to the Cloud Firestore backend.

Your application is deployed on hundreds of Compute Engine instances in a managed instance group (MIG) in multiple zones. You need to deploy a new instance template to fix a critical vulnerability immediately but must avoid impact to your service. What setting should be made to the MIG after updating the instance template?

A.
Set the Max Surge to 100%.
A.
Set the Max Surge to 100%.
Answers
B.
Set the Update mode to Opportunistic.
B.
Set the Update mode to Opportunistic.
Answers
C.
Set the Maximum Unavailable to 100%.
C.
Set the Maximum Unavailable to 100%.
Answers
D.
Set the Minimum Wait time to 0 seconds.
D.
Set the Minimum Wait time to 0 seconds.
Answers
Suggested answer: B

Explanation:

https://cloud.google.com/compute/docs/instance-groups/rolling-out-updates-to-managed-instance-groups#type Alternatively, if an automated update is potentially too disruptive, you can choose to perform an opportunistic update. The MIG applies an opportunistic update only when you manually initiate the update on selected instances or when new instances are created. New instances can be created when you or another service, such as an autoscaler, resizes the MIG. Compute Engine does not actively initiate requests to apply opportunistic updates on existing instances.

You made a typo in a low-level Linux configuration file that prevents your Compute Engine instance from booting to a normal run level. You just created the Compute Engine instance today and have done no other maintenance on it, other than tweaking files. How should you correct this error?

A.
Download the file using scp, change the file, and then upload the modified version
A.
Download the file using scp, change the file, and then upload the modified version
Answers
B.
Configure and log in to the Compute Engine instance through SSH, and change the file
B.
Configure and log in to the Compute Engine instance through SSH, and change the file
Answers
C.
Configure and log in to the Compute Engine instance through the serial port, and change the file
C.
Configure and log in to the Compute Engine instance through the serial port, and change the file
Answers
D.
Configure and log in to the Compute Engine instance using a remote desktop client, and change the file
D.
Configure and log in to the Compute Engine instance using a remote desktop client, and change the file
Answers
Suggested answer: C

Explanation:

https://cloud.google.com/compute/docs/troubleshooting/troubleshooting-using-serial-console

You are developing an application that needs to store files belonging to users in Cloud Storage. You want each user to have their own subdirectory in Cloud Storage. When a new user is created, the corresponding empty subdirectory should also be created. What should you do?

A.
Create an object with the name of the subdirectory ending with a trailing slash ('/') that is zero bytes in length.
A.
Create an object with the name of the subdirectory ending with a trailing slash ('/') that is zero bytes in length.
Answers
B.
Create an object with the name of the subdirectory, and then immediately delete the object within that subdirectory.
B.
Create an object with the name of the subdirectory, and then immediately delete the object within that subdirectory.
Answers
C.
Create an object with the name of the subdirectory that is zero bytes in length and has WRITER access control list permission.
C.
Create an object with the name of the subdirectory that is zero bytes in length and has WRITER access control list permission.
Answers
D.
Create an object with the name of the subdirectory that is zero bytes in length. Set the Content-Type metadata to CLOUDSTORAGE_FOLDER.
D.
Create an object with the name of the subdirectory that is zero bytes in length. Set the Content-Type metadata to CLOUDSTORAGE_FOLDER.
Answers
Suggested answer: A

Explanation:

https://cloud.google.com/storage/docs/folders

If you create an empty folder using the Google Cloud console, Cloud Storage creates a zero-byte object as a placeholder. For example, if you create a folder called folder in a bucket called my-bucket, a zero- byte object called gs://my-bucket/folder/ is created. This placeholder is discoverable by other tools when listing the objects in the bucket, for example when using the gsutil ls command.

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?

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

Explanation:

https://cloud.google.com/build/docs/configuring-builds/pass-data-between-steps#passing_data_using_workspaces

To pass data between build steps, store the assets produced by the build step in /workspace and these assets will be available to any subsequent build steps.

One of your deployed applications in Google Kubernetes Engine (GKE) is having intermittent performance issues. Your team uses a third-party logging solution. You want to install this solution on each node in your GKE cluster so you can view the logs. What should you do?

A.
Deploy the third-party solution as a DaemonSet
A.
Deploy the third-party solution as a DaemonSet
Answers
B.
Modify your container image to include the monitoring software
B.
Modify your container image to include the monitoring software
Answers
C.
Use SSH to connect to the GKE node, and install the software manually
C.
Use SSH to connect to the GKE node, and install the software manually
Answers
D.
Deploy the third-party solution using Terraform and deploy the logging Pod as a Kubernetes Deployment
D.
Deploy the third-party solution using Terraform and deploy the logging Pod as a Kubernetes Deployment
Answers
Suggested answer: A

Explanation:

https://cloud.google.com/kubernetes-engine/docs/concepts/daemonset#usage_patterns DaemonSets are useful for deploying ongoing background tasks that you need to run on all or certain nodes, and which do not require user intervention. Examples of such tasks include storage daemons like ceph, log collection daemons like fluent-bit, and node monitoring daemons like collectd.

You are in the final stage of migrating an on-premises data center to Google Cloud. You are quickly approaching your deadline, and discover that a web API is running on a server slated for decommissioning. You need to recommend a solution to modernize this API while migrating to Google Cloud. The modernized web API must meet the following requirements:

* Autoscales during high traffic periods at the end of each month

* Written in Python 3.x

* Developers must be able to rapidly deploy new versions in response to frequent code changes

You want to minimize cost, effort, and operational overhead of this migration. What should you do?

A.
Modernize and deploy the code on App Engine flexible environment.
A.
Modernize and deploy the code on App Engine flexible environment.
Answers
B.
Modernize and deploy the code on App Engine standard environment.
B.
Modernize and deploy the code on App Engine standard environment.
Answers
C.
Deploy the modernized application to an n1-standard-1 Compute Engine instance.
C.
Deploy the modernized application to an n1-standard-1 Compute Engine instance.
Answers
D.
Ask the development team to re-write the application to run as a Docker container on Google Kubernetes Engine.
D.
Ask the development team to re-write the application to run as a Docker container on Google Kubernetes Engine.
Answers
Suggested answer: B

Explanation:

https://cloud.google.com/appengine/docs/standard

You are developing an application that will allow users to read and post comments on news articles. You want to configure your application to store and display user-submitted comments using Firestore. How should you design the schema to support an unknown number of comments and articles?

A.
Store each comment in a subcollection of the article.
A.
Store each comment in a subcollection of the article.
Answers
B.
Add each comment to an array property on the article.
B.
Add each comment to an array property on the article.
Answers
C.
Store each comment in a document, and add the comment's key to an array property on the article.
C.
Store each comment in a document, and add the comment's key to an array property on the article.
Answers
D.
Store each comment in a document, and add the comment's key to an array property on the user profile.
D.
Store each comment in a document, and add the comment's key to an array property on the user profile.
Answers
Suggested answer: D

You recently developed an application. You need to call the Cloud Storage API from a Compute Engine instance that doesn't have a public IP address. What should you do?

A.
Use Carrier Peering
A.
Use Carrier Peering
Answers
B.
Use VPC Network Peering
B.
Use VPC Network Peering
Answers
C.
Use Shared VPC networks
C.
Use Shared VPC networks
Answers
D.
Use Private Google Access
D.
Use Private Google Access
Answers
Suggested answer: D

Explanation:

https://cloud.google.com/vpc/docs/private-google-access

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?

A.
Create a new feature branch, and ask the build team to rebuild the image.
A.
Create a new feature branch, and ask the build team to rebuild the image.
Answers
B.
Shut down the deployed virtual machine, export the disk, and then mount the disk locally to access the boot logs.
B.
Shut down the deployed virtual machine, export the disk, and then mount the disk locally to access the boot logs.
Answers
C.
Install Packer locally, build the Compute Engine image locally, and then run it in your personal Google Cloud project.
C.
Install Packer locally, build the Compute Engine image locally, and then run it in your personal Google Cloud project.
Answers
D.
Check Compute Engine OS logs using the serial port, and check the Cloud Logging logs to confirm access to the serial port.
D.
Check Compute Engine OS logs using the serial port, and check the Cloud Logging logs to confirm access to the serial port.
Answers
Suggested answer: D

Explanation:

https://cloud.google.com/compute/docs/troubleshooting/troubleshooting-using-serial-console

Total 265 questions
Go to page: of 27