ExamGecko
Home Home / Google / Professional Cloud Developer

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

Question list
Search
Search

List of questions

Search

Related questions











Your operations team has asked you to create a script that lists the Cloud Bigtable, Memorystore, and Cloud SQL databases running within a project. The script should allow users to submit a filter expression to limit the results presented. How should you retrieve the data?

A.
Use the HBase API, Redis API, and MySQL connection to retrieve database lists. Combine the results, and then apply the filter to display the results
A.
Use the HBase API, Redis API, and MySQL connection to retrieve database lists. Combine the results, and then apply the filter to display the results
Answers
B.
Use the HBase API, Redis API, and MySQL connection to retrieve database lists. Filter the results individually, and then combine them to display the results
B.
Use the HBase API, Redis API, and MySQL connection to retrieve database lists. Filter the results individually, and then combine them to display the results
Answers
C.
Run gcloud bigtable instances list, gcloud redis instances list, and gcloud sql databases list. Use a filter within the application, and then display the results
C.
Run gcloud bigtable instances list, gcloud redis instances list, and gcloud sql databases list. Use a filter within the application, and then display the results
Answers
D.
Run gcloud bigtable instances list, gcloud redis instances list, and gcloud sql databases list. Use --filter flag with each command, and then display the results
D.
Run gcloud bigtable instances list, gcloud redis instances list, and gcloud sql databases list. Use --filter flag with each command, and then display the results
Answers
Suggested answer: D

Explanation:

https://cloud.google.com/sdk/gcloud/reference/topic/filters

Most gcloud commands return a list of resources on success. By default they are pretty-printed on the standard output. The --format=NAME[ATTRIBUTES](PROJECTION) and --filter=EXPRESSION flags along with projections can be used to format and change the default output to a more meaningful result. Use the --format flag to change the default output format of a command. For details run $ gcloud topic formats.

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?

A.
Define a new Ingress resource with a host rule matching the new domain
A.
Define a new Ingress resource with a host rule matching the new domain
Answers
B.
Modify the existing Ingress resource with a host rule matching the new domain
B.
Modify the existing Ingress resource with a host rule matching the new domain
Answers
C.
Create a new Service of type LoadBalancer specifying the existing IP address as the loadBalancerIP
C.
Create a new Service of type LoadBalancer specifying the existing IP address as the loadBalancerIP
Answers
D.
Generate a new Ingress resource and specify the existing IP address as the kubernetes.io/ingress.global-static-ip-name annotation value
D.
Generate a new Ingress resource and specify the existing IP address as the kubernetes.io/ingress.global-static-ip-name annotation value
Answers
Suggested answer: B

Explanation:

https://kubernetes.io/docs/concepts/services-networking/ingress/#name-based-virtual-hosting Name-based virtual hosts support routing HTTP traffic to multiple host names at the same IP address.

You are developing a single-player mobile game backend that has unpredictable traffic patterns as users interact with the game throughout the day and night. You want to optimize costs by ensuring that you have enough resources to handle requests, but minimize over-provisioning. You also want the system to handle traffic spikes efficiently. Which compute platform should you use?

A.
Cloud Run
A.
Cloud Run
Answers
B.
Compute Engine with managed instance groups
B.
Compute Engine with managed instance groups
Answers
C.
Compute Engine with unmanaged instance groups
C.
Compute Engine with unmanaged instance groups
Answers
D.
Google Kubernetes Engine using cluster autoscaling
D.
Google Kubernetes Engine using cluster autoscaling
Answers
Suggested answer: A

The development teams in your company want to manage resources from their local environments. You have been asked to enable developer access to each team's Google Cloud projects. You want to maximize efficiency while following Google-recommended best practices. What should you do?

A.
Add the users to their projects, assign the relevant roles to the users, and then provide the users with each relevant Project ID.
A.
Add the users to their projects, assign the relevant roles to the users, and then provide the users with each relevant Project ID.
Answers
B.
Add the users to their projects, assign the relevant roles to the users, and then provide the users with each relevant Project Number.
B.
Add the users to their projects, assign the relevant roles to the users, and then provide the users with each relevant Project Number.
Answers
C.
Create groups, add the users to their groups, assign the relevant roles to the groups, and then provide the users with each relevant Project ID.
C.
Create groups, add the users to their groups, assign the relevant roles to the groups, and then provide the users with each relevant Project ID.
Answers
D.
Create groups, add the users to their groups, assign the relevant roles to the groups, and then provide the users with each relevant Project Number.
D.
Create groups, add the users to their groups, assign the relevant roles to the groups, and then provide the users with each relevant Project Number.
Answers
Suggested answer: C

Your company's product team has a new requirement based on customer demand to autoscale your stateless and distributed service running in a Google Kubernetes Engine (GKE) duster. You want to find a solution that minimizes changes because this feature will go live in two weeks. What should you do?

A.
Deploy a Vertical Pod Autoscaler, and scale based on the CPU load.
A.
Deploy a Vertical Pod Autoscaler, and scale based on the CPU load.
Answers
B.
Deploy a Vertical Pod Autoscaler, and scale based on a custom metric.
B.
Deploy a Vertical Pod Autoscaler, and scale based on a custom metric.
Answers
C.
Deploy a Horizontal Pod Autoscaler, and scale based on the CPU toad.
C.
Deploy a Horizontal Pod Autoscaler, and scale based on the CPU toad.
Answers
D.
Deploy a Horizontal Pod Autoscaler, and scale based on a custom metric.
D.
Deploy a Horizontal Pod Autoscaler, and scale based on a custom metric.
Answers
Suggested answer: C

Explanation:

https://cloud.google.com/kubernetes-engine/docs/concepts/horizontalpodautoscaler

The Horizontal Pod Autoscaler changes the shape of your Kubernetes workload by automatically increasing or decreasing the number of Pods in response to the workload's CPU or memory consumption, or in response to custom metrics reported from within Kubernetes or external metrics from sources outside of your cluster.

Your application is composed of a set of loosely coupled services orchestrated by code executed on Compute Engine. You want your application to easily bring up new Compute Engine instances that find and use a specific version of a service. How should this be configured?

A.
Define your service endpoint information as metadata that is retrieved at runtime and used to connect to the desired service.
A.
Define your service endpoint information as metadata that is retrieved at runtime and used to connect to the desired service.
Answers
B.
Define your service endpoint information as label data that is retrieved at runtime and used to connect to the desired service.
B.
Define your service endpoint information as label data that is retrieved at runtime and used to connect to the desired service.
Answers
C.
Define your service endpoint information to be retrieved from an environment variable at runtime and used to connect to the desired service.
C.
Define your service endpoint information to be retrieved from an environment variable at runtime and used to connect to the desired service.
Answers
D.
Define your service to use a fixed hostname and port to connect to the desired service. Replace the service at the endpoint with your new version.
D.
Define your service to use a fixed hostname and port to connect to the desired service. Replace the service at the endpoint with your new version.
Answers
Suggested answer: A

Explanation:

https://cloud.google.com/service-infrastructure/docs/service-metadata/reference/rest#service-endpoint

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.)

A.
Use the service account attached to the GKE node.
A.
Use the service account attached to the GKE node.
Answers
B.
Enable Workload Identity in the cluster via the gcloud command-line tool.
B.
Enable Workload Identity in the cluster via the gcloud command-line tool.
Answers
C.
Access the Google service account keys from a secret management service.
C.
Access the Google service account keys from a secret management service.
Answers
D.
Store the Google service account keys in a central secret management service.
D.
Store the Google service account keys in a central secret management service.
Answers
E.
Use gcloud to bind the Kubernetes service account and the Google service account using roles/iam.workloadIdentity.
E.
Use gcloud to bind the Kubernetes service account and the Google service account using roles/iam.workloadIdentity.
Answers
Suggested answer: B, E

Explanation:

https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity

Your development team has been tasked with maintaining a .NET legacy application. The application incurs occasional changes and was recently updated. Your goal is to ensure that the application provides consistent results while moving through the CI/CD pipeline from environment to environment. You want to minimize the cost of deployment while making sure that external factors and dependencies between hosting environments are not problematic. Containers are not yet approved in your organization. What should you do?

A.
Rewrite the application using .NET Core, and deploy to Cloud Run. Use revisions to separate the environments.
A.
Rewrite the application using .NET Core, and deploy to Cloud Run. Use revisions to separate the environments.
Answers
B.
Use Cloud Build to deploy the application as a new Compute Engine image for each build. Use this image in each environment.
B.
Use Cloud Build to deploy the application as a new Compute Engine image for each build. Use this image in each environment.
Answers
C.
Deploy the application using MS Web Deploy, and make sure to always use the latest, patched MS Windows Server base image in Compute Engine.
C.
Deploy the application using MS Web Deploy, and make sure to always use the latest, patched MS Windows Server base image in Compute Engine.
Answers
D.
Use Cloud Build to package the application, and deploy to a Google Kubernetes Engine cluster. Use namespaces to separate the environments.
D.
Use Cloud Build to package the application, and deploy to a Google Kubernetes Engine cluster. Use namespaces to separate the environments.
Answers
Suggested answer: B

Explanation:

https://cloud.google.com/architecture/modernization-path-dotnet-applications-google-cloud#phase_1_rehost_in_the_cloud

https://cloud.google.com/architecture/modernization-path-dotnet-applications-google-cloud

The new version of your containerized application has been tested and is ready to deploy to production on Google Kubernetes Engine. You were not able to fully load-test the new version in pre-production environments, and you need to make sure that it does not have performance problems once deployed. Your deployment must be automated. What should you do?

A.
Use Cloud Load Balancing to slowly ramp up traffic between versions. Use Cloud Monitoring to look for performance issues.
A.
Use Cloud Load Balancing to slowly ramp up traffic between versions. Use Cloud Monitoring to look for performance issues.
Answers
B.
Deploy the application via a continuous delivery pipeline using canary deployments. Use Cloud Monitoring to look for performance issues. and ramp up traffic as the metrics support it.
B.
Deploy the application via a continuous delivery pipeline using canary deployments. Use Cloud Monitoring to look for performance issues. and ramp up traffic as the metrics support it.
Answers
C.
Deploy the application via a continuous delivery pipeline using blue/green deployments. Use Cloud Monitoring to look for performance issues, and launch fully when the metrics support it.
C.
Deploy the application via a continuous delivery pipeline using blue/green deployments. Use Cloud Monitoring to look for performance issues, and launch fully when the metrics support it.
Answers
D.
Deploy the application using kubectl and set the spec.updateStrategv.type to RollingUpdate. Use Cloud Monitoring to look for performance issues, and run the kubectl rollback command if there are any issues.
D.
Deploy the application using kubectl and set the spec.updateStrategv.type to RollingUpdate. Use Cloud Monitoring to look for performance issues, and run the kubectl rollback command if there are any issues.
Answers
Suggested answer: C

Explanation:

https://cloud.google.com/architecture/implementing-deployment-and-testing-strategies-on-gke#perform_a_bluegreen_deployment

Users are complaining that your Cloud Run-hosted website responds too slowly during traffic spikes. You want to provide a better user experience during traffic peaks. What should you do?

A.
Read application configuration and static data from the database on application startup.
A.
Read application configuration and static data from the database on application startup.
Answers
B.
Package application configuration and static data into the application image during build time.
B.
Package application configuration and static data into the application image during build time.
Answers
C.
Perform as much work as possible in the background after the response has been returned to the user.
C.
Perform as much work as possible in the background after the response has been returned to the user.
Answers
D.
Ensure that timeout exceptions and errors cause the Cloud Run instance to exit quickly so a replacement instance can be started.
D.
Ensure that timeout exceptions and errors cause the Cloud Run instance to exit quickly so a replacement instance can be started.
Answers
Suggested answer: C
Total 265 questions
Go to page: of 27