ExamGecko
Home Home / Google / Professional Cloud Developer

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

Question list
Search
Search

List of questions

Search

Related questions











You are developing an application using different microservices that should remain internal to the cluster. You want to be able to configure each microservice with a specific number of replicas. You also want to be able to address a specific microservice from any other microservice in a uniform way, regardless of the number of replicas the microservice scales to. You need to implement this solution on Google Kubernetes Engine. What should you do?

A.
Deploy each microservice as a Deployment. Expose the Deployment in the cluster using a Service, and use the Service DNS name to address it from other microservices within the cluster.
A.
Deploy each microservice as a Deployment. Expose the Deployment in the cluster using a Service, and use the Service DNS name to address it from other microservices within the cluster.
Answers
B.
Deploy each microservice as a Deployment. Expose the Deployment in the cluster using an Ingress, and use the Ingress IP address to address the Deployment from other microservices within the cluster.
B.
Deploy each microservice as a Deployment. Expose the Deployment in the cluster using an Ingress, and use the Ingress IP address to address the Deployment from other microservices within the cluster.
Answers
C.
Deploy each microservice as a Pod. Expose the Pod in the cluster using a Service, and use the Service DNS name to address the microservice from other microservices within the cluster.
C.
Deploy each microservice as a Pod. Expose the Pod in the cluster using a Service, and use the Service DNS name to address the microservice from other microservices within the cluster.
Answers
D.
Deploy each microservice as a Pod. Expose the Pod in the cluster using an Ingress, and use the Ingress IP address name to address the Pod from other microservices within the cluster.
D.
Deploy each microservice as a Pod. Expose the Pod in the cluster using an Ingress, and use the Ingress IP address name to address the Pod from other microservices within the cluster.
Answers
Suggested answer: A

Your team is responsible for maintaining an application that aggregates news articles from many different sources. Your monitoring dashboard contains publicly accessible real-time reports and runs on a Compute Engine instance as a web application. External stakeholders and analysts need to access these reports via a secure channel without authentication. How should you configure this secure channel?

A.
Add a public IP address to the instance. Use the service account key of the instance to encrypt the traffic.
A.
Add a public IP address to the instance. Use the service account key of the instance to encrypt the traffic.
Answers
B.
Use Cloud Scheduler to trigger Cloud Build every hour to create an export from the reports. Store the reports in a public Cloud Storage bucket.
B.
Use Cloud Scheduler to trigger Cloud Build every hour to create an export from the reports. Store the reports in a public Cloud Storage bucket.
Answers
C.
Add an HTTP(S) load balancer in front of the monitoring dashboard. Configure Identity-Aware Proxy to secure the communication channel.
C.
Add an HTTP(S) load balancer in front of the monitoring dashboard. Configure Identity-Aware Proxy to secure the communication channel.
Answers
D.
Add an HTTP(S) load balancer in front of the monitoring dashboard. Set up a Google-managed SSL certificate on the load balancer for traffic encryption.
D.
Add an HTTP(S) load balancer in front of the monitoring dashboard. Set up a Google-managed SSL certificate on the load balancer for traffic encryption.
Answers
Suggested answer: D

Explanation:

https://cloud.google.com/load-balancing/docs/ssl-certificates/google-managed-certs

You are planning to add unit tests to your application. You need to be able to assert that published Pub/Sub messages are processed by your subscriber in order. You want the unit tests to be cost-effective and reliable. What should you do?

A.
Implement a mocking framework.
A.
Implement a mocking framework.
Answers
B.
Create a topic and subscription for each tester.
B.
Create a topic and subscription for each tester.
Answers
C.
Add a filter by tester to the subscription.
C.
Add a filter by tester to the subscription.
Answers
D.
Use the Pub/Sub emulator.
D.
Use the Pub/Sub emulator.
Answers
Suggested answer: D

Explanation:

https://cloud.google.com/pubsub/docs/emulator, 'Testing apps locally with the emulator'.

You have an application deployed in Google Kubernetes Engine (GKE) that reads and processes Pub/Sub messages. Each Pod handles a fixed number of messages per minute. The rate at which messages are published to the Pub/Sub topic varies considerably throughout the day and week, including occasional large batches of messages published at a single moment.

You want to scale your GKE Deployment to be able to process messages in a timely manner. What GKE feature should you use to automatically adapt your workload?

A.
Vertical Pod Autoscaler in Auto mode
A.
Vertical Pod Autoscaler in Auto mode
Answers
B.
Vertical Pod Autoscaler in Recommendation mode
B.
Vertical Pod Autoscaler in Recommendation mode
Answers
C.
Horizontal Pod Autoscaler based on an external metric
C.
Horizontal Pod Autoscaler based on an external metric
Answers
D.
Horizontal Pod Autoscaler based on resources utilization
D.
Horizontal Pod Autoscaler based on resources utilization
Answers
Suggested answer: C

Explanation:

https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/

You are using Cloud Run to host a web application. You need to securely obtain the application project ID and region where the application is running and display this information to users. You want to use the most performant approach. What should you do?

A.
Use HTTP requests to query the available metadata server at the http://metadata.google.internal/ endpoint with the Metadata-Flavor: Google header.
A.
Use HTTP requests to query the available metadata server at the http://metadata.google.internal/ endpoint with the Metadata-Flavor: Google header.
Answers
B.
In the Google Cloud console, navigate to the Project Dashboard and gather configuration details. Navigate to the Cloud Run ''Variables & Secrets'' tab, and add the desired environment variables in Key:Value format.
B.
In the Google Cloud console, navigate to the Project Dashboard and gather configuration details. Navigate to the Cloud Run ''Variables & Secrets'' tab, and add the desired environment variables in Key:Value format.
Answers
C.
In the Google Cloud console, navigate to the Project Dashboard and gather configuration details. Write the application configuration information to Cloud Run's in-memory container filesystem.
C.
In the Google Cloud console, navigate to the Project Dashboard and gather configuration details. Write the application configuration information to Cloud Run's in-memory container filesystem.
Answers
D.
Make an API call to the Cloud Asset Inventory API from the application and format the request to include instance metadata.
D.
Make an API call to the Cloud Asset Inventory API from the application and format the request to include instance metadata.
Answers
Suggested answer: B

You need to deploy resources from your laptop to Google Cloud using Terraform. Resources in your Google Cloud environment must be created using a service account. Your Cloud Identity has the roles/iam.serviceAccountTokenCreator Identity and Access Management (IAM) role and the necessary permissions to deploy the resources using Terraform. You want to set up your development environment to deploy the desired resources following Google-recommended best practices. What should you do?

A.
1) Download the service account's key file in JSON format, and store it locally on your laptop. 2) Set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the path of your downloaded key file.
A.
1) Download the service account's key file in JSON format, and store it locally on your laptop. 2) Set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the path of your downloaded key file.
Answers
B.
1) Run the following command from a command line: gcloud config set auth/impersonate_service_account [email protected]. 2) Set the GOOGLE_OAUTH_ACCESS_TOKEN environment variable to the value that is returned by the gcloud auth print-access-token command.
B.
1) Run the following command from a command line: gcloud config set auth/impersonate_service_account [email protected]. 2) Set the GOOGLE_OAUTH_ACCESS_TOKEN environment variable to the value that is returned by the gcloud auth print-access-token command.
Answers
C.
1) Run the following command from a command line: gcloud auth application-default login. 2) In the browser window that opens, authenticate using your personal credentials.
C.
1) Run the following command from a command line: gcloud auth application-default login. 2) In the browser window that opens, authenticate using your personal credentials.
Answers
D.
1) Store the service account's key file in JSON format in Hashicorp Vault. 2) Integrate Terraform with Vault to retrieve the key file dynamically, and authenticate to Vault using a short-lived access token.
D.
1) Store the service account's key file in JSON format in Hashicorp Vault. 2) Integrate Terraform with Vault to retrieve the key file dynamically, and authenticate to Vault using a short-lived access token.
Answers
Suggested answer: D

Explanation:

https://cloud.google.com/iam/docs/best-practices-for-managing-service-account-keys#file-system

Whenever possible, avoid storing service account keys on a file system. If you can't avoid storing keys on disk, make sure to restrict access to the key file, configure file access auditing, and encrypt the underlying disk.

https://cloud.google.com/iam/docs/best-practices-for-managing-service-account-keys#software-keystore

In situations where using a hardware-based key store isn't viable, use a software-based key store to manage service account keys. Similar to hardware-based options, a software-based key store lets users or applications use service account keys without revealing the private key. Software-based key store solutions can help you control key access in a fine-grained manner and can also ensure that each key access is logged.

Your company uses Cloud Logging to manage large volumes of log data. You need to build a real-time log analysis architecture that pushes logs to a third-party application for processing. What should you do?

A.
Create a Cloud Logging log export to Pub/Sub.
A.
Create a Cloud Logging log export to Pub/Sub.
Answers
B.
Create a Cloud Logging log export to BigQuery.
B.
Create a Cloud Logging log export to BigQuery.
Answers
C.
Create a Cloud Logging log export to Cloud Storage.
C.
Create a Cloud Logging log export to Cloud Storage.
Answers
D.
Create a Cloud Function to read Cloud Logging log entries and send them to the third-party application.
D.
Create a Cloud Function to read Cloud Logging log entries and send them to the third-party application.
Answers
Suggested answer: A

You are developing a new public-facing application that needs to retrieve specific properties in the metadata of users' objects in their respective Cloud Storage buckets. Due to privacy and data residency requirements, you must retrieve only the metadata and not the object data. You want to maximize the performance of the retrieval process. How should you retrieve the metadata?

A.
Use the patch method.
A.
Use the patch method.
Answers
B.
Use the compose method.
B.
Use the compose method.
Answers
C.
Use the copy method.
C.
Use the copy method.
Answers
D.
Use the fields request parameter.
D.
Use the fields request parameter.
Answers
Suggested answer: D

Explanation:

https://cloud.google.com/storage/docs/json_api/v1/objects/get

You are deploying a microservices application to Google Kubernetes Engine (GKE) that will broadcast livestreams. You expect unpredictable traffic patterns and large variations in the number of concurrent users. Your application must meet the following requirements:

* Scales automatically during popular events and maintains high availability

* Is resilient in the event of hardware failures

How should you configure the deployment parameters? (Choose two.)

A.
Distribute your workload evenly using a multi-zonal node pool.
A.
Distribute your workload evenly using a multi-zonal node pool.
Answers
B.
Distribute your workload evenly using multiple zonal node pools.
B.
Distribute your workload evenly using multiple zonal node pools.
Answers
C.
Use cluster autoscaler to resize the number of nodes in the node pool, and use a Horizontal Pod Autoscaler to scale the workload.
C.
Use cluster autoscaler to resize the number of nodes in the node pool, and use a Horizontal Pod Autoscaler to scale the workload.
Answers
D.
Create a managed instance group for Compute Engine with the cluster nodes. Configure autoscaling rules for the managed instance group.
D.
Create a managed instance group for Compute Engine with the cluster nodes. Configure autoscaling rules for the managed instance group.
Answers
E.
Create alerting policies in Cloud Monitoring based on GKE CPU and memory utilization. Ask an on-duty engineer to scale the workload by executing a script when CPU and memory usage exceed predefined thresholds.
E.
Create alerting policies in Cloud Monitoring based on GKE CPU and memory utilization. Ask an on-duty engineer to scale the workload by executing a script when CPU and memory usage exceed predefined thresholds.
Answers
Suggested answer: A, C

You work at a rapidly growing financial technology startup. You manage the payment processing application written in Go and hosted on Cloud Run in the Singapore region (asia-southeast1). The payment processing application processes data stored in a Cloud Storage bucket that is also located in the Singapore region.

The startup plans to expand further into the Asia Pacific region. You plan to deploy the Payment Gateway in Jakarta, Hong Kong, and Taiwan over the next six months. Each location has data residency requirements that require customer data to reside in the country where the transaction was made. You want to minimize the cost of these deployments. What should you do?

A.
Create a Cloud Storage bucket in each region, and create a Cloud Run service of the payment processing application in each region.
A.
Create a Cloud Storage bucket in each region, and create a Cloud Run service of the payment processing application in each region.
Answers
B.
Create a Cloud Storage bucket in each region, and create three Cloud Run services of the payment processing application in the Singapore region.
B.
Create a Cloud Storage bucket in each region, and create three Cloud Run services of the payment processing application in the Singapore region.
Answers
C.
Create three Cloud Storage buckets in the Asia multi-region, and create three Cloud Run services of the payment processing application in the Singapore region.
C.
Create three Cloud Storage buckets in the Asia multi-region, and create three Cloud Run services of the payment processing application in the Singapore region.
Answers
D.
Create three Cloud Storage buckets in the Asia multi-region, and create three Cloud Run revisions of the payment processing application in the Singapore region.
D.
Create three Cloud Storage buckets in the Asia multi-region, and create three Cloud Run revisions of the payment processing application in the Singapore region.
Answers
Suggested answer: A
Total 265 questions
Go to page: of 27