ExamGecko
Home Home / Google / Associate Cloud Engineer

Google Associate Cloud Engineer Practice Test - Questions Answers, Page 4

Question list
Search
Search

List of questions

Search

Related questions











You want to send and consume Cloud Pub/Sub messages from your App Engine application. The Cloud Pub/Sub API is currently disabled. You will use a service account to authenticate your application to the API. You want to make sure your application can use Cloud Pub/Sub. What should you do?

A.
Enable the Cloud Pub/Sub API in the API Library on the GCP Console.
A.
Enable the Cloud Pub/Sub API in the API Library on the GCP Console.
Answers
B.
Rely on the automatic enablement of the Cloud Pub/Sub API when the Service Account accesses it.
B.
Rely on the automatic enablement of the Cloud Pub/Sub API when the Service Account accesses it.
Answers
C.
Use Deployment Manager to deploy your application. Rely on the automatic enablement of all APIs used by the application being deployed.
C.
Use Deployment Manager to deploy your application. Rely on the automatic enablement of all APIs used by the application being deployed.
Answers
D.
Grant the App Engine Default service account the role of Cloud Pub/Sub Admin. Have your application enable the API on the first connection to Cloud Pub/Sub.
D.
Grant the App Engine Default service account the role of Cloud Pub/Sub Admin. Have your application enable the API on the first connection to Cloud Pub/Sub.
Answers
Suggested answer: A

Explanation:

Quickstart: using the Google Cloud Console

This page shows you how to perform basic tasks in Pub/Sub using the Google Cloud Console.

Note: If you are new to Pub/Sub, we recommend that you start with the interactive tutorial.

Before you begin

Set up a Cloud Console project.

Set up a project

Click to:

Create or select a project.

Enable the Pub/Sub API for that project.

You can view and manage these resources at any time in the Cloud Console.

Install and initialize the Cloud SDK.

Note: You can run the gcloud tool in the Cloud Console without installing the Cloud SDK. To run the gcloud tool in the Cloud Console, use Cloud Shell .

https://cloud.google.com/pubsub/docs/quickstart-console

You need to monitor resources that are distributed over different projects in Google Cloud Platform. You want to consolidate reporting under the same Stackdriver Monitoring dashboard. What should you do?

A.
Use Shared VPC to connect all projects, and link Stackdriver to one of the projects.
A.
Use Shared VPC to connect all projects, and link Stackdriver to one of the projects.
Answers
B.
For each project, create a Stackdriver account. In each project, create a service account for that project and grant it the role of Stackdriver Account Editor in all other projects.
B.
For each project, create a Stackdriver account. In each project, create a service account for that project and grant it the role of Stackdriver Account Editor in all other projects.
Answers
C.
Configure a single Stackdriver account, and link all projects to the same account.
C.
Configure a single Stackdriver account, and link all projects to the same account.
Answers
D.
Configure a single Stackdriver account for one of the projects. In Stackdriver, create a Group and add the other project names as criteria for that Group.
D.
Configure a single Stackdriver account for one of the projects. In Stackdriver, create a Group and add the other project names as criteria for that Group.
Answers
Suggested answer: C

Explanation:

When you intially click on Monitoring(Stackdriver Monitoring) it creates a workspac(a stackdriver account) linked to the ACTIVE(CURRENT) Project from which it was clicked.

Now if you change the project and again click onto Monitoring it would create an another workspace(a stackdriver account) linked to the changed ACTIVE(CURRENT) Project, we don't want this as this would not consolidate our result into a single dashboard(workspace/stackdriver account).

If you have accidently created two diff workspaces merge them under Monitoring > Settings > Merge Workspaces > MERGE.

If we have only one workspace and two projects we can simply add other GCP Project under

Monitoring > Settings > GCP Projects > Add GCP Projects.

https://cloud.google.com/monitoring/settings/multiple-projects

Nothing about groups https://cloud.google.com/monitoring/settings?hl=en

You are deploying an application to a Compute Engine VM in a managed instance group. The application must be running at all times, but only a single instance of the VM should run per GCP project. How should you configure the instance group?

A.
Set autoscaling to On, set the minimum number of instances to 1, and then set the maximum number of instances to 1.
A.
Set autoscaling to On, set the minimum number of instances to 1, and then set the maximum number of instances to 1.
Answers
B.
Set autoscaling to Off, set the minimum number of instances to 1, and then set the maximum number of instances to 1.
B.
Set autoscaling to Off, set the minimum number of instances to 1, and then set the maximum number of instances to 1.
Answers
C.
Set autoscaling to On, set the minimum number of instances to 1, and then set the maximum number of instances to 2.
C.
Set autoscaling to On, set the minimum number of instances to 1, and then set the maximum number of instances to 2.
Answers
D.
Set autoscaling to Off, set the minimum number of instances to 1, and then set the maximum number of instances to 2.
D.
Set autoscaling to Off, set the minimum number of instances to 1, and then set the maximum number of instances to 2.
Answers
Suggested answer: A

Explanation:

https://cloud.google.com/compute/docs/autoscaler#specifications

Autoscaling works independently from autohealing. If you configure autohealing for your group and an instance fails the health check, the autohealer attempts to recreate the instance. Recreating an instance can cause the number of instances in the group to fall below the autoscaling threshold (minNumReplicas) that you specify.

Since we need the application running at all times, we need a minimum 1 instance.

Only a single instance of the VM should run, we need a maximum 1 instance.

We want the application running at all times. If the VM crashes due to any underlying hardware failure, we want another instance to be added to MIG so that application can continue to serve requests. We can achieve this by enabling autoscaling. The only option that satisfies these three is Set autoscaling to On, set the minimum number of instances to 1, and then set the maximum number of instances to 1.

Ref:https://cloud.google.com/compute/docs/autoscaler

You are deploying an application to a Compute Engine VM in a managed instance group. The application must be running at all times, but only a single instance of the VM should run per GCP project. How should you configure the instance group?

A.
Set autoscaling to On, set the minimum number of instances to 1, and then set the maximum number of instances to 1.
A.
Set autoscaling to On, set the minimum number of instances to 1, and then set the maximum number of instances to 1.
Answers
B.
Set autoscaling to Off, set the minimum number of instances to 1, and then set the maximum number of instances to 1.
B.
Set autoscaling to Off, set the minimum number of instances to 1, and then set the maximum number of instances to 1.
Answers
C.
Set autoscaling to On, set the minimum number of instances to 1, and then set the maximum number of instances to 2.
C.
Set autoscaling to On, set the minimum number of instances to 1, and then set the maximum number of instances to 2.
Answers
D.
Set autoscaling to Off, set the minimum number of instances to 1, and then set the maximum number of instances to 2.
D.
Set autoscaling to Off, set the minimum number of instances to 1, and then set the maximum number of instances to 2.
Answers
Suggested answer: A

Explanation:

https://cloud.google.com/compute/docs/autoscaler#specifications

Autoscaling works independently from autohealing. If you configure autohealing for your group and an instance fails the health check, the autohealer attempts to recreate the instance. Recreating an instance can cause the number of instances in the group to fall below the autoscaling threshold (minNumReplicas) that you specify.

Since we need the application running at all times, we need a minimum 1 instance.

Only a single instance of the VM should run, we need a maximum 1 instance.

We want the application running at all times. If the VM crashes due to any underlying hardware failure, we want another instance to be added to MIG so that application can continue to serve requests. We can achieve this by enabling autoscaling. The only option that satisfies these three is Set autoscaling to On, set the minimum number of instances to 1, and then set the maximum number of instances to 1.

Ref:https://cloud.google.com/compute/docs/autoscaler

You need to create a new billing account and then link it with an existing Google Cloud Platform project. What should you do?

A.
Verify that you are Project Billing Manager for the GCP project. Update the existing project to link it to the existing billing account.
A.
Verify that you are Project Billing Manager for the GCP project. Update the existing project to link it to the existing billing account.
Answers
B.
Verify that you are Project Billing Manager for the GCP project. Create a new billing account and link the new billing account to the existing project.
B.
Verify that you are Project Billing Manager for the GCP project. Create a new billing account and link the new billing account to the existing project.
Answers
C.
Verify that you are Billing Administrator for the billing account. Create a new project and link the new project to the existing billing account.
C.
Verify that you are Billing Administrator for the billing account. Create a new project and link the new project to the existing billing account.
Answers
D.
Verify that you are Billing Administrator for the billing account. Update the existing project to link it to the existing billing account.
D.
Verify that you are Billing Administrator for the billing account. Update the existing project to link it to the existing billing account.
Answers
Suggested answer: B

Explanation:

Billing Administrators can not create a new billing account, and the project is presumably already created. Project Billing Manager allows you to link the created billing account to the project. It is vague on how the billing account gets created but by process of elimination

You have one project called proj-sa where you manage all your service accounts. You want to be able to use a service account from this project to take snapshots of VMs running in another project called proj-vm. What should you do?

A.
Download the private key from the service account, and add it to each VMs custom metadata.
A.
Download the private key from the service account, and add it to each VMs custom metadata.
Answers
B.
Download the private key from the service account, and add the private key to each VM's SSH keys.
B.
Download the private key from the service account, and add the private key to each VM's SSH keys.
Answers
C.
Grant the service account the IAM Role of Compute Storage Admin in the project called proj-vm.
C.
Grant the service account the IAM Role of Compute Storage Admin in the project called proj-vm.
Answers
D.
When creating the VMs, set the service account's API scope for Compute Engine to read/write.
D.
When creating the VMs, set the service account's API scope for Compute Engine to read/write.
Answers
Suggested answer: C

Explanation:

https://gtseres.medium.com/using-service-accounts-across-projects-in-gcp-cf9473fef8f0

You create the service account in proj-sa and take note of the service account email, then you go to proj-vm in IAM > ADD and add the service account's email as new member and give it the Compute Storage Admin role.

https://cloud.google.com/compute/docs/access/iam#compute.storageAdmin

You created a Google Cloud Platform project with an App Engine application inside the project. You initially configured the application to be served from the us-central region. Now you want the application to be served from the asia-northeast1 region. What should you do?

A.
Change the default region property setting in the existing GCP project to asia-northeast1.
A.
Change the default region property setting in the existing GCP project to asia-northeast1.
Answers
B.
Change the region property setting in the existing App Engine application from us-central to asia-northeast1.
B.
Change the region property setting in the existing App Engine application from us-central to asia-northeast1.
Answers
C.
Create a second App Engine application in the existing GCP project and specify asia-northeast1 as the region to serve your application.
C.
Create a second App Engine application in the existing GCP project and specify asia-northeast1 as the region to serve your application.
Answers
D.
Create a new GCP project and create an App Engine application inside this new project. Specify asia-northeast1 as the region to serve your application.
D.
Create a new GCP project and create an App Engine application inside this new project. Specify asia-northeast1 as the region to serve your application.
Answers
Suggested answer: D

Explanation:

https://cloud.google.com/appengine/docs/flexible/managing-projects-apps-billing#:~:text=Each%20Cloud%20project%20can%20contain%20only%20a%20single%20App%20Engine%20application%2C%20and%20once%20created%20you%20cannot%20change%20the%20location%20of%20your%20App%20Engine%20application.

Two App engine can't be running on the same project: you can check this easy diagram for more info: https://cloud.google.com/appengine/docs/standard/an-overview-of-app-engine#components_of_an_application

And you can't change location after setting it for your app Engine. https://cloud.google.com/appengine/docs/standard/locations

App Engine is regional and you cannot change an apps region after you set it. Therefore, the only way to have an app run in another region is by creating a new project and targeting the app engine to run in the required region (asia-northeast1 in our case).

Ref:https://cloud.google.com/appengine/docs/locations

You need to grant access for three users so that they can view and edit table data on a Cloud Spanner instance. What should you do?

A.
Run gcloud iam roles describe roles/spanner.databaseUser. Add the users to the role.
A.
Run gcloud iam roles describe roles/spanner.databaseUser. Add the users to the role.
Answers
B.
Run gcloud iam roles describe roles/spanner.databaseUser. Add the users to a new group. Add the group to the role.
B.
Run gcloud iam roles describe roles/spanner.databaseUser. Add the users to a new group. Add the group to the role.
Answers
C.
Run gcloud iam roles describe roles/spanner.viewer --project my-project. Add the users to the role.
C.
Run gcloud iam roles describe roles/spanner.viewer --project my-project. Add the users to the role.
Answers
D.
Run gcloud iam roles describe roles/spanner.viewer --project my-project. Add the users to a new group. Add the group to the role.
D.
Run gcloud iam roles describe roles/spanner.viewer --project my-project. Add the users to a new group. Add the group to the role.
Answers
Suggested answer: B

Explanation:

https://cloud.google.com/spanner/docs/iam#spanner.databaseUser

Using the gcloud tool, execute the gcloud iam roles describe roles/spanner.databaseUser command on Cloud Shell. Attach the users to a newly created Google group and add the group to the role.

You create a new Google Kubernetes Engine (GKE) cluster and want to make sure that it always runs a supported and stable version of Kubernetes. What should you do?

A.
Enable the Node Auto-Repair feature for your GKE cluster.
A.
Enable the Node Auto-Repair feature for your GKE cluster.
Answers
B.
Enable the Node Auto-Upgrades feature for your GKE cluster.
B.
Enable the Node Auto-Upgrades feature for your GKE cluster.
Answers
C.
Select the latest available cluster version for your GKE cluster.
C.
Select the latest available cluster version for your GKE cluster.
Answers
D.
Select ''Container-Optimized OS (cos)'' as a node image for your GKE cluster.
D.
Select ''Container-Optimized OS (cos)'' as a node image for your GKE cluster.
Answers
Suggested answer: B

Explanation:

Creating or upgrading a cluster by specifying the version as latest does not provide automatic upgrades. Enable node auto-upgrades to ensure that the nodes in your cluster are up-to-date with the latest stable version.

https://cloud.google.com/kubernetes-engine/versioning-and-upgrades

Node auto-upgrades help you keep the nodes in your cluster up to date with the cluster master version when your master is updated on your behalf. When you create a new cluster or node pool with Google Cloud Console or the gcloud command, node auto-upgrade is enabled by default.

Ref:https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-upgrades

You have an instance group that you want to load balance. You want the load balancer to terminate the client SSL session. The instance group is used to serve a public web application over HTTPS. You want to follow Google-recommended practices. What should you do?

A.
Configure an HTTP(S) load balancer.
A.
Configure an HTTP(S) load balancer.
Answers
B.
Configure an internal TCP load balancer.
B.
Configure an internal TCP load balancer.
Answers
C.
Configure an external SSL proxy load balancer.
C.
Configure an external SSL proxy load balancer.
Answers
D.
Configure an external TCP proxy load balancer.
D.
Configure an external TCP proxy load balancer.
Answers
Suggested answer: A

Explanation:

According to this guide for setting up an HTTP (S) load balancer in GCP: The client SSL session terminates at the load balancer. Sessions between the load balancer and the instance can either be HTTPS (recommended) or HTTP.

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

Total 289 questions
Go to page: of 29