ExamGecko
Home Home / Google / Associate Cloud Engineer

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

Question list
Search
Search

List of questions

Search

Related questions











You have 32 GB of data in a single file that you need to upload to a Nearline Storage bucket. The WAN connection you are using is rated at 1 Gbps, and you are the only one on the connection. You want to use as much of the rated 1 Gbps as possible to transfer the file rapidly. How should you upload the file?

A.
Use the GCP Console to transfer the file instead of gsutil.
A.
Use the GCP Console to transfer the file instead of gsutil.
Answers
B.
Enable parallel composite uploads using gsutil on the file transfer.
B.
Enable parallel composite uploads using gsutil on the file transfer.
Answers
C.
Decrease the TCP window size on the machine initiating the transfer.
C.
Decrease the TCP window size on the machine initiating the transfer.
Answers
D.
Change the storage class of the bucket from Nearline to Multi-Regional.
D.
Change the storage class of the bucket from Nearline to Multi-Regional.
Answers
Suggested answer: B

Explanation:

https://cloud.google.com/storage/docs/parallel-composite-uploads

https://cloud.google.com/storage/docs/uploads-downloads#parallel-composite-uploads

You've deployed a microservice called myapp1 to a Google Kubernetes Engine cluster using the YAML file specified below:

You need to refactor this configuration so that the database password is not stored in plain text. You want to follow Google-recommended practices. What should you do?

A.
Store the database password inside the Docker image of the container, not in the YAML file.
A.
Store the database password inside the Docker image of the container, not in the YAML file.
Answers
B.
Store the database password inside a Secret object. Modify the YAML file to populate the DB_PASSWORD environment variable from the Secret.
B.
Store the database password inside a Secret object. Modify the YAML file to populate the DB_PASSWORD environment variable from the Secret.
Answers
C.
Store the database password inside a ConfigMap object. Modify the YAML file to populate the DB_PASSWORD environment variable from the ConfigMap.
C.
Store the database password inside a ConfigMap object. Modify the YAML file to populate the DB_PASSWORD environment variable from the ConfigMap.
Answers
D.
Store the database password in a file inside a Kubernetes persistent volume, and use a persistent volume claim to mount the volume to the container.
D.
Store the database password in a file inside a Kubernetes persistent volume, and use a persistent volume claim to mount the volume to the container.
Answers
Suggested answer: B

Explanation:

https://cloud.google.com/config-connector/docs/how-to/secrets#gcloud

You are running an application on multiple virtual machines within a managed instance group and have autoscaling enabled. The autoscaling policy is configured so that additional instances are added to the group if the CPU utilization of instances goes above 80%. VMs are added until the instance group reaches its maximum limit of five VMs or until CPU utilization of instances lowers to 80%. The initial delay for HTTP health checks against the instances is set to 30 seconds. The virtual machine instances take around three minutes to become available for users. You observe that when the instance group autoscales, it adds more instances then necessary to support the levels of end-user traffic. You want to properly maintain instance group sizes when autoscaling. What should you do?

A.
Set the maximum number of instances to 1.
A.
Set the maximum number of instances to 1.
Answers
B.
Decrease the maximum number of instances to 3.
B.
Decrease the maximum number of instances to 3.
Answers
C.
Use a TCP health check instead of an HTTP health check.
C.
Use a TCP health check instead of an HTTP health check.
Answers
D.
Increase the initial delay of the HTTP health check to 200 seconds.
D.
Increase the initial delay of the HTTP health check to 200 seconds.
Answers
Suggested answer: D

Explanation:

So setting this to 200 ensures that it waits until the instance is up (around 180-second mark) and then starts forwarding traffic to this instance. Even after a cool out period, if the CPU utilization is still high, the autoscaler can again scale up but this scale-up is genuine and is based on the actual load.

Initial Delay Seconds This setting delays autohealing from potentially prematurely recreating the instance if the instance is in the process of starting up. The initial delay timer starts when the currentAction of the instance is VERIFYING. Ref:https://cloud.google.com/compute/docs/instance-groups/autohealing-instances-in-migs

You need to select and configure compute resources for a set of batch processing jobs. These jobs take around 2 hours to complete and are run nightly. You want to minimize service costs. What should you do?

A.
Select Google Kubernetes Engine. Use a single-node cluster with a small instance type.
A.
Select Google Kubernetes Engine. Use a single-node cluster with a small instance type.
Answers
B.
Select Google Kubernetes Engine. Use a three-node cluster with micro instance types.
B.
Select Google Kubernetes Engine. Use a three-node cluster with micro instance types.
Answers
C.
Select Compute Engine. Use preemptible VM instances of the appropriate standard machine type.
C.
Select Compute Engine. Use preemptible VM instances of the appropriate standard machine type.
Answers
D.
Select Compute Engine. Use VM instance types that support micro bursting.
D.
Select Compute Engine. Use VM instance types that support micro bursting.
Answers
Suggested answer: C

Explanation:

If your apps are fault-tolerant and can withstand possible instance preemptions, then preemptible instances can reduce your Compute Engine costs significantly. For example, batch processing jobs can run on preemptible instances. If some of those instances stop during processing, the job slows but does not completely stop. Preemptible instances complete your batch processing tasks without placing additional workload on your existing instances and without requiring you to pay full price for additional normal instances.

https://cloud.google.com/compute/docs/instances/preemptible

You recently deployed a new version of an application to App Engine and then discovered a bug in the release. You need to immediately revert to the prior version of the application. What should you do?

A.
Run gcloud app restore.
A.
Run gcloud app restore.
Answers
B.
On the App Engine page of the GCP Console, select the application that needs to be reverted and click Revert.
B.
On the App Engine page of the GCP Console, select the application that needs to be reverted and click Revert.
Answers
C.
On the App Engine Versions page of the GCP Console, route 100% of the traffic to the previous version.
C.
On the App Engine Versions page of the GCP Console, route 100% of the traffic to the previous version.
Answers
D.
Deploy the original version as a separate application. Then go to App Engine settings and split traffic between applications so that the original version serves 100% of the requests.
D.
Deploy the original version as a separate application. Then go to App Engine settings and split traffic between applications so that the original version serves 100% of the requests.
Answers
Suggested answer: C

You deployed an App Engine application using gcloud app deploy, but it did not deploy to the intended project. You want to find out why this happened and where the application deployed. What should you do?

A.
Check the app.yaml file for your application and check project settings.
A.
Check the app.yaml file for your application and check project settings.
Answers
B.
Check the web-application.xml file for your application and check project settings.
B.
Check the web-application.xml file for your application and check project settings.
Answers
C.
Go to Deployment Manager and review settings for deployment of applications.
C.
Go to Deployment Manager and review settings for deployment of applications.
Answers
D.
Go to Cloud Shell and run gcloud config list to review the Google Cloud configuration used for deployment.
D.
Go to Cloud Shell and run gcloud config list to review the Google Cloud configuration used for deployment.
Answers
Suggested answer: D

Explanation:

C:\GCP\appeng>gcloud config list

[core]

account = [email protected]

disable_usage_reporting = False

project = my-first-demo-xxxx

https://cloud.google.com/endpoints/docs/openapi/troubleshoot-gce-deployment

You want to configure 10 Compute Engine instances for availability when maintenance occurs. Your requirements state that these instances should attempt to automatically restart if they crash. Also, the instances should be highly available including during system maintenance. What should you do?

A.
Create an instance template for the instances. Set the 'Automatic Restart' to on. Set the 'On-host maintenance' to Migrate VM instance. Add the instance template to an instance group.
A.
Create an instance template for the instances. Set the 'Automatic Restart' to on. Set the 'On-host maintenance' to Migrate VM instance. Add the instance template to an instance group.
Answers
B.
Create an instance template for the instances. Set 'Automatic Restart' to off. Set 'On-host maintenance' to Terminate VM instances. Add the instance template to an instance group.
B.
Create an instance template for the instances. Set 'Automatic Restart' to off. Set 'On-host maintenance' to Terminate VM instances. Add the instance template to an instance group.
Answers
C.
Create an instance group for the instances. Set the 'Autohealing' health check to healthy (HTTP).
C.
Create an instance group for the instances. Set the 'Autohealing' health check to healthy (HTTP).
Answers
D.
Create an instance group for the instance. Verify that the 'Advanced creation options' setting for 'do not retry machine creation' is set to off.
D.
Create an instance group for the instance. Verify that the 'Advanced creation options' setting for 'do not retry machine creation' is set to off.
Answers
Suggested answer: A

Explanation:

Ref:https://cloud.google.com/compute/docs/instances/setting-instance-scheduling-options#autorestart

Enabling the Migrate VM Instance option migrates your instance away from an infrastructure maintenance event, and your instance remains running during the migration. Your instance might experience a short period of decreased performance, although generally, most instances should not notice any difference. This is ideal for instances that require constant uptime and can tolerate a short period of decreased performance. Ref:https://cloud.google.com/compute/docs/instances/setting-instance-scheduling-options#live_migrate

You host a static website on Cloud Storage. Recently, you began to include links to PDF files on this site. Currently, when users click on the links to these PDF files, their browsers prompt them to save the file onto their local system. Instead, you want the clicked PDF files to be displayed within the browser window directly, without prompting the user to save the file locally. What should you do?

A.
Enable Cloud CDN on the website frontend.
A.
Enable Cloud CDN on the website frontend.
Answers
B.
Enable 'Share publicly' on the PDF file objects.
B.
Enable 'Share publicly' on the PDF file objects.
Answers
C.
Set Content-Type metadata to application/pdf on the PDF file objects.
C.
Set Content-Type metadata to application/pdf on the PDF file objects.
Answers
D.
Add a label to the storage bucket with a key of Content-Type and value of application/pdf.
D.
Add a label to the storage bucket with a key of Content-Type and value of application/pdf.
Answers
Suggested answer: C

Explanation:

https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_Types#importance_of_setting_the_correct_mime_type

You have a virtual machine that is currently configured with 2 vCPUs and 4 GB of memory. It is running out of memory. You want to upgrade the virtual machine to have 8 GB of memory. What should you do?

A.
Rely on live migration to move the workload to a machine with more memory.
A.
Rely on live migration to move the workload to a machine with more memory.
Answers
B.
Use gcloud to add metadata to the VM. Set the key to required-memory-size and the value to 8 GB.
B.
Use gcloud to add metadata to the VM. Set the key to required-memory-size and the value to 8 GB.
Answers
C.
Stop the VM, change the machine type to n1-standard-8, and start the VM.
C.
Stop the VM, change the machine type to n1-standard-8, and start the VM.
Answers
D.
Stop the VM, increase the memory to 8 GB, and start the VM.
D.
Stop the VM, increase the memory to 8 GB, and start the VM.
Answers
Suggested answer: D

Explanation:

In Google compute engine, if predefined machine types don't meet your needs, you can create an instance with custom virtualized hardware settings. Specifically, you can create an instance with a custom number of vCPUs and custom memory, effectively using a custom machine type. Custom machine types are ideal for the following scenarios: 1. Workloads that aren't a good fit for the predefined machine types that are available to you. 2. Workloads that require more processing power or more memory but don't need all of the upgrades that are provided by the next machine type level. In our scenario, we only need a memory upgrade. Moving to a bigger instance would also bump up the CPU which we don't need so we have to use a custom machine type. It is not possible to change memory while the instance is running so you need to first stop the instance, change the memory and then start it again. See below a screenshot that shows how CPU/Memory can be customized for an instance that has been stopped. Ref:https://cloud.google.com/compute/docs/instances/creating-instance-with-custom-machine-type

You have production and test workloads that you want to deploy on Compute Engine. Production VMs need to be in a different subnet than the test VMs. All the VMs must be able to reach each other over internal IP without creating additional routes. You need to set up VPC and the 2 subnets. Which configuration meets these requirements?

A.
Create a single custom VPC with 2 subnets. Create each subnet in a different region and with a different CIDR range.
A.
Create a single custom VPC with 2 subnets. Create each subnet in a different region and with a different CIDR range.
Answers
B.
Create a single custom VPC with 2 subnets. Create each subnet in the same region and with the same CIDR range.
B.
Create a single custom VPC with 2 subnets. Create each subnet in the same region and with the same CIDR range.
Answers
C.
Create 2 custom VPCs, each with a single subnet. Create each subnet is a different region and with a different CIDR range.
C.
Create 2 custom VPCs, each with a single subnet. Create each subnet is a different region and with a different CIDR range.
Answers
D.
Create 2 custom VPCs, each with a single subnet. Create each subnet in the same region and with the same CIDR range.
D.
Create 2 custom VPCs, each with a single subnet. Create each subnet in the same region and with the same CIDR range.
Answers
Suggested answer: A

Explanation:

When we create subnets in the same VPC with different CIDR ranges, they can communicate automatically within VPC. Resources within a VPC network can communicate with one another by using internal (private) IPv4 addresses, subject to applicable network firewall rules

Ref:https://cloud.google.com/vpc/docs/vpc

Total 289 questions
Go to page: of 29