Google Cloud Associate Cloud Engineer Exam MCQ With Answers GCP ACE 2


Associate Cloud Engineer

Google Cloud


Google Cloud Associate Cloud Engineer


Associate Cloud Engineers deploy applications, monitor operations, and manage enterprise solutions. They use Google Cloud Console and the command-line interface to perform common platform-based tasks to maintain one or more deployed solutions that leverage Google-managed or self-managed services on Google Cloud.


The Associate Cloud Engineer exam assesses your ability to:


  • Set up a cloud solution environment
  • Plan and configure a cloud solution
  • Deploy and implement a cloud solution
  • Ensure successful operation of a cloud solution
  • Configure access and security

About this certification exam


  • Length: 2 hours
  • Registration fee: $125 (plus tax where applicable)
  • Languages: English, Japanese, Spanish, Portuguese
  • Exam format: 50-60 multiple choice and multiple select questions

GOOGLE CLOUD ASSOCIATE CLOUD ENGINEER MCQ

 
1. You need to set up permissions for a set of Compute Engine instances to enable them to write data into a particular Cloud Storage bucket. You want to follow Google-recommended practices. What should you do?

  1. Create a service account with an access scope. Use the access scope "˜https://www.googleapis.com/auth/devstorage.write_only'.
  2. Create a service account with an access scope. Use the access scope "˜https://www.googleapis.com/auth/cloudplatform'.
  3. Create a service account and add it to the IAM role "˜storage.objectCreator' for that bucket.
  4. Create a service account and add it to the IAM role "˜storage.objectAdmin' for that bucket.

Answer: Create a service account and add it to the IAM role "˜storage.objectCreator' for that bucket.


2. You have sensitive data stored in three Cloud Storage buckets and have enabled data access logging. You want to verify activities for a particular user for these buckets, using the fewest possible steps. You need to verify the addition of metadata labels and which files have been viewed from those buckets. What should you do?

  1. Using the GCP Console, filter the Activity log to view the information.
  2. Using the GCP Console, filter the Stackdriver log to view the information.
  3. View the bucket in the Storage section of the GCP Console.
  4. Create a trace in Stackdriver to view the information.

Answer: Using the GCP Console, filter the Activity log to view the information.


3.You are the project owner of a GCP project and want to delegate control to colleagues to manage buckets and files in Cloud Storage. You want to follow Google- recommended practices. Which IAM roles should you grant your colleagues?

  1. Project Editor
  2. Storage Admin
  3. Storage Object Admin
  4. Storage Object Creator

Answer: Storage Admin


4. You have an object in a Cloud Storage bucket that you want to share with an external company. The object contains sensitive data. You want access to the content to be removed after four hours. The external company does not have a Google account to which you can grant specific user-based access privileges. You want to use the most secure method that requires the fewest steps. What should you do?

  1. Create a signed URL with a four-hour expiration and share the URL with the company.
  2. Set object access to "˜public' and use object lifecycle management to remove the object after four hours.
  3. Configure the storage bucket as a static website and furnish the object's URL to the company. Delete the object from the storage bucket after four hours.
  4. Create a new Cloud Storage bucket specifically for the external company to access. Copy the object to that bucket. Delete the bucket after four hours have passed.

Answer: Create a signed URL with a four-hour expiration and share the URL with the company.

 
5. You are creating a Google Kubernetes Engine (GKE) cluster with a cluster autoscaler feature enabled. You need to make sure that each node of the cluster will run a monitoring pod that sends container metrics to a third-party monitoring solution. What should you do?

  1. Deploy the monitoring pod in a StatefulSet object.
  2. Deploy the monitoring pod in a DaemonSet object.
  3. Reference the monitoring pod in a Deployment object.
  4. Reference the monitoring pod in a cluster initializer at the GKE cluster creation time.

Answer: Deploy the monitoring pod in a DaemonSet object.


6. 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?

  1. Enable the Cloud Pub/Sub API in the API Library on the GCP Console.
  2. Rely on the automatic enablement of the Cloud Pub/Sub API when the Service Account accesses it.
  3. Use Deployment Manager to deploy your application. Rely on the automatic enablement of all APIs used by the application being deployed.
  4. 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.

Answer: Enable the Cloud Pub/Sub API in the API Library on the GCP Console.


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

  1. Use Shared VPC to connect all projects, and link Stackdriver to one of the projects.
  2. 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.
  3. Configure a single Stackdriver account, and link all projects to the same account.
  4. 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.

Answer: Configure a single Stackdriver account, and link all projects to the same account.

 
8. 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?
  1. Set autoscaling to On, set the minimum number of instances to 1, and then set the maximum number of instances to 1.
  2. Set autoscaling to Off, set the minimum number of instances to 1, and then set the maximum number of instances to 1.
  3. Set autoscaling to On, set the minimum number of instances to 1, and then set the maximum number of instances to 2.
  4. Set autoscaling to Off, set the minimum number of instances to 1, and then set the maximum number of instances to 2.

Answer: Set autoscaling to On, set the minimum number of instances to 1, and then set the maximum number of instances to 1.


9. You want to verify the IAM users and roles assigned within a GCP project named my-project. What should you do?

  1. Run gcloud iam roles list. Review the output section.
  2. Run gcloud iam service-accounts list. Review the output section.
  3. Navigate to the project and then to the IAM section in the GCP Console. Review the members and roles.
  4. Navigate to the project and then to the Roles section in the GCP Console. Review the roles and status.

Answer: Navigate to the project and then to the IAM section in the GCP Console. Review the members and roles.


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

  1. Verify that you are Project Billing Manager for the GCP project. Update the existing project to link it to the existing billing account.
  2. 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.
  3. Verify that you are Billing Administrator for the billing account. Create a new project and link the new project to the existing billing account.
  4. Verify that you are Billing Administrator for the billing account. Update the existing project to link it to the existing billing account.

Answer: 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.


11. 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?

  1. Download the private key from the service account, and add it to each VMs custom metadata.
  2. Download the private key from the service account, and add the private key to each VM's SSH keys.
  3. Grant the service account the IAM Role of Compute Storage Admin in the project called proj-vm.
  4. When creating the VMs, set the service account's API scope for Compute Engine to read/write.

Answer: Grant the service account the IAM Role of Compute Storage Admin in the project called proj-vm.

 
12. 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?

  1. Change the default region property setting in the existing GCP project to asia-northeast1.
  2. Change the region property setting in the existing App Engine application from us-central to asia-northeast1.
  3. Create a second App Engine application in the existing GCP project and specify asia-northeast1 as the region to serve your application.
  4. 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.

Answer: 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.


13. 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?

  1. Run gcloud iam roles describe roles/spanner.databaseUser. Add the users to the role.
  2. Run gcloud iam roles describe roles/spanner.databaseUser. Add the users to a new group. Add the group to the role.
  3. Run gcloud iam roles describe roles/spanner.viewer - -project my-project. Add the users to the role.
  4. Run gcloud iam roles describe roles/spanner.viewer - -project my-project. Add the users to a new group. Add the group to the role.

Answer: Run gcloud iam roles describe roles/spanner.databaseUser. Add the users to a new group. Add the group to the role.


14. 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?

  1. Enable the Node Auto-Repair feature for your GKE cluster.
  2. Enable the Node Auto-Upgrades feature for your GKE cluster.
  3. Select the latest available cluster version for your GKE cluster.
  4. Select "Container-Optimized OS (cos)" as a node image for your GKE cluster.

Answer: Enable the Node Auto-Upgrades feature for your GKE cluster. 

 
15. 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 Googlerecommended practices. What should you do?

  1. Configure an HTTP(S) load balancer.
  2. Configure an internal TCP load balancer.
  3. Configure an external SSL proxy load balancer.
  4. Configure an external TCP proxy load balancer.

Answer: Configure an HTTP(S) load balancer.

 
16. 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?

  1. Use the GCP Console to transfer the file instead of gsutil.
  2. Enable parallel composite uploads using gsutil on the file transfer.
  3. Decrease the TCP window size on the machine initiating the transfer.
  4. Change the storage class of the bucket from Nearline to Multi-Regional.

Answer: Enable parallel composite uploads using gsutil on the file transfer.


17. You've deployed a microservice called myapp1 to a Google Kubernetes Engine cluster using the YAML file specified below: 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?

Question 42


  1. Store the database password inside the Docker image of the container, not in the YAML file.
  2. Store the database password inside a Secret object. Modify the YAML file to populate the DB_PASSWORD environment variable from the Secret.
  3. Store the database password inside a ConfigMap object. Modify the YAML file to populate the DB_PASSWORD environment variable from the ConfigMap.
  4. 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.

Answer: Store the database password inside a Secret object. Modify the YAML file to populate the DB_PASSWORD environment variable from the Secret.
 

18. 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?

  1. Set the maximum number of instances to 1.
  2. Decrease the maximum number of instances to 3.
  3. Use a TCP health check instead of an HTTP health check.
  4. Increase the initial delay of the HTTP health check to 200 seconds.

Answer: Increase the initial delay of the HTTP health check to 200 seconds.

 
19. 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?

  1. Select Google Kubernetes Engine. Use a single-node cluster with a small instance type.
  2. Select Google Kubernetes Engine. Use a three-node cluster with micro instance types.
  3. Select Compute Engine. Use preemptible VM instances of the appropriate standard machine type.
  4. Select Compute Engine. Use VM instance types that support micro bursting.

Answer: Select Compute Engine. Use preemptible VM instances of the appropriate standard machine type.


20. 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?

  1. Run gcloud app restore.
  2. On the App Engine page of the GCP Console, select the application that needs to be reverted and click Revert.
  3. On the App Engine Versions page of the GCP Console, route 100% of the traffic to the previous version.
  4. 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.

Answer: On the App Engine Versions page of the GCP Console, route 100% of the traffic to the previous version.


21. 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?

  1. Check the app.yaml file for your application and check project settings.
  2. Check the web-application.xml file for your application and check project settings.
  3. Go to Deployment Manager and review settings for deployment of applications.
  4. Go to Cloud Shell and run gcloud config list to review the Google Cloud configuration used for deployment.

Answer: Go to Cloud Shell and run gcloud config list to review the Google Cloud configuration used for deployment.


22. 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?

  1. 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.
  2. 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.
  3. Create an instance group for the instances. Set the "˜Autohealing' health check to healthy (HTTP).
  4. Create an instance group for the instance. Verify that the "˜Advanced creation options' setting for "˜do not retry machine creation' is set to off.

Answer: 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.


23. 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?

  1. Enable Cloud CDN on the website frontend.
  2. Enable "˜Share publicly' on the PDF file objects.
  3. Set Content-Type metadata to application/pdf on the PDF file objects.
  4. Add a label to the storage bucket with a key of Content-Type and value of application/pdf.

Answer: Set Content-Type metadata to application/pdf on the PDF file objects.


24. 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?

  1. Rely on live migration to move the workload to a machine with more memory.
  2. Use gcloud to add metadata to the VM. Set the key to required-memory-size and the value to 8 GB.
  3. Stop the VM, change the machine type to n1-standard-8, and start the VM.
  4. Stop the VM, increase the memory to 8 GB, and start the VM.

Answer: Stop the VM, increase the memory to 8 GB, and start the VM.


25. 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?

  1. Create a single custom VPC with 2 subnets. Create each subnet in a different region and with a different CIDR range.
  2. Create a single custom VPC with 2 subnets. Create each subnet in the same region and with the same CIDR range.
  3. Create 2 custom VPCs, each with a single subnet. Create each subnet is a different region and with a different CIDR range.
  4. Create 2 custom VPCs, each with a single subnet. Create each subnet in the same region and with the same CIDR range.

Answer: Create a single custom VPC with 2 subnets. Create each subnet in a different region and with a different CIDR range.






Post a Comment