Ace Your Associate Cloud Engineer with Practice Exams.
Google Cloud Certified – Associate Cloud Engineer Practice Exam (Q 50)
QUESTION 1
Every employee of your company has a Google account.
Your operational team needs to manage a large number of instances on Google Compute Engine. Each member of this team needs only administrative access to the servers. Your security team wants to ensure that the deployment of credentials is operationally efficient and must be able to determine who accessed a given instance.
What should you do?
- A. Generate a new SSH key pair. Give the private key to each member of your team. Configure the public key in the metadata of each instance.
- B. Ask each member of the team to generate a new SSH key pair and to send you their public key. Use a configuration management tool to deploy those keys on each instance.
- C. Ask each member of the team to generate a new SSH key pair and to add the public key to their Google account. Grant the compute.osAdminLogin role to the Google group corresponding to this team.
- D. Generate a new SSH key pair. Give the private key to each member of your team. Configure the public key as a project-wide public SSH key in your Google Cloud Platform project and allow project-wide public SSH keys on each instance.
Correct Answer: C
Reference contents:
– Choose an access method | Compute Engine Documentation | Google Cloud
QUESTION 2
You need to create a custom VPC with a single subnet.
The subnet’s range must be as large as possible.
Which range should you use?
- A. 0.0.0.0/0
- B. 10.0.0.0/8
- C. 172.16.0.0/12
- D. 192.168.0.0/16
Correct Answer: B
Reference contents:
– VPC network overview | Google Cloud
QUESTION 3
You want to select and configure a cost-effective solution for relational data on Google Cloud Platform.
You are working with a small set of operational data in one geographic location. You need to support point-in-time recovery.
What should you do?
- A. Select Google Cloud SQL (MySQL). Verify that the enable binary logging option is selected.
- B. Select Google Cloud SQL (MySQL). Select the create failover replicas option.
- C. Select Google Cloud Spanner. Set up your instance with 2 nodes.
- D. Select Google Cloud Spanner. Set up your instance as multi-regional.
Correct Answer: A
Reference contents:
– #Perform the point-in-time recovery using binary log positions – About restoring an instance | Cloud SQL for MySQL
QUESTION 4
You want to configure autohealing for network load balancing for a group of Google Compute Engine instances that run in multiple zones, using the fewest possible steps.
You need to configure re-creation of VMs if they are unresponsive after 3 attempts of 10 seconds each.
What should you do?
- A. Create an HTTP load balancer with a backend configuration that references an existing instance group. Set the health check to healthy (HTTP)
- B. Create an HTTP load balancer with a backend configuration that references an existing instance group. Define a balancing mode and set the maximum RPS to 10.
- C. Create a managed instance group. Set the Autohealing health check to healthy (HTTP)
- D. Create a managed instance group. Verify that the autoscaling setting is on.
Correct Answer: C
Reference contents:
– Using autohealing for highly available apps | Compute Engine Documentation | Google Cloud
– Instance groups | Compute Engine Documentation | Google Cloud
QUESTION 5
You are using multiple configurations for gcloud.
You want to review the configured Google Kubernetes Engine cluster of an inactive configuration using the fewest possible steps.
What should you do?
- A. Use gcloud config configurations describe to review the output.
- B. Use gcloud config configurations activate and gcloud config list to review the output.
- C. Use kubectl config get-contexts to review the output.
- D. Use kubectl config use-context and kubectl config view to review the output.
Correct Answer: D
Reference contents:
– Kubernetes Engine: kubectl config | by Daz Wilkin | Google Cloud – Community | Medium
– #Kubectl context and configuration kubectl – Cheat Sheet | Kubernetes
QUESTION 6
Your company uses Google Cloud Storage to store application backup files for disaster recovery purposes.
You want to follow Google’s recommended practices.
Which storage option should you use?
- A. Multi-Regional Storage
- B. Regional Storage
- C. Nearline Storage
- D. Coldline Storage
Correct Answer: D
Reference contents:
– #Nearline Storage – Storage classes | Google Cloud
QUESTION 7
Several employees at your company have been creating projects with Google Cloud Platform and paying for it with their personal credit cards, which the company reimburses.
The company wants to centralize all these projects under a single, new billing account.
What should you do?
- A. Contact cloud-billing@google.com with your bank account details and request a corporate billing account for your company.
- B. Create a ticket with Google Support and wait for their call to share your credit card details over the phone.
- C. In the Google Platform Console, go to the Resource Manage and move all projects to the root Organizarion.
- D. In the Google Cloud Platform Console, create a new billing account and set up a payment method.
Correct Answer: D
Reference contents:
– Migrating projects | Resource Manager Documentation | Google Cloud
QUESTION 8
You have an application that looks for its licensing server on the IP 10.0.3.21.
You need to deploy the licensing server on Google Compute Engine. You do not want to change the configuration of the application and want the application to be able to reach the licensing server.
What should you do?
- A. Reserve the IP 10.0.3.21 as a static internal IP address using gcloud and assign it to the licensing server.
- B. Reserve the IP 10.0.3.21 as a static public IP address using gcloud and assign it to the licensing server.
- C. Use the IP 10.0.3.21 as a custom ephemeral IP address and assign it to the licensing server.
- D. Start the licensing server with an automatic ephemeral IP address, and then promote it to a static internal IP address.
Correct Answer: A
QUESTION 9
You are deploying an application to Google App Engine.
You want the number of instances to scale based on request rate. You need at least 3 unoccupied instances at all times.
Which scaling type should you use?
- A. Manual Scaling with 3 instances.
- B. Basic Scaling with min_instances set to 3.
- C. Basic Scaling with max_instances set to 3.
- D. Automatic Scaling with min_idle_instances set to 3.
Correct Answer: D
Reference contents:
– How Instances are Managed | App Engine standard environment for Python 2 | Google Cloud
QUESTION 10
You have a development project with appropriate IAM roles defined.
You are creating a production project and want to have the same IAM roles on the new project, using the fewest possible steps.
What should you do?
- A. Use gcloud iam roles copy and specify the production project as the destination project.
- B. Use gcloud iam roles copy and specify your organization as the destination organization.
- C. In the Google Cloud Platform Console, use the create role from role functionality.
- D. In the Google Cloud Platform Console, use the create role functionality and select all applicable permissions.
Correct Answer: A
Reference contents:
– gcloud iam roles copy | Google Cloud CLI Documentation
QUESTION 11
You need a dynamic way of provisioning VMs on Google Compute Engine.
The exact specifications will be in a dedicated configuration file. You want to follow Google’s recommended practices.
Which method should you use?
- A. Google Cloud Deployment Manager
- B. Google Cloud Composer
- C. Managed Instance Group
- D. Unmanaged Instance Group
Correct Answer: A
QUESTION 12
You have a Dockerfile that you need to deploy on Google Kubernetes Engine.
What should you do?
- A. Use kubectl app deploy <dockerfilename>.
- B. Use gcloud app deploy <dockerfilename>.
- C. Create a docker image from the Dockerfile and upload it to Google Container Registry. Create a Deployment YAML file to point to that image. Use kubectl to create the deployment with that file.
- D. Create a docker image from the Dockerfile and upload it to Google Cloud Storage. Create a Deployment YAML file to point to that image. Use kubectl to create the deployment with that file.
Correct Answer: C
Reference contents:
– Deploying a containerized web application | Kubernetes Engine | Google Cloud
QUESTION 13
Your development team needs a new Jenkins server for their project.
You need to deploy the server using the fewest steps possible.
What should you do?
- A. Download and deploy the Jenkins Java WAR to Google App Engine Standard.
- B. Create a new Google Compute Engine instance and install Jenkins through the command line interface.
- C. Create a Kubernetes cluster on Google Compute Engine and create a deployment with the Jenkins Docker image.
- D. Use GCP Marketplace to launch the Jenkins solution.
Correct Answer: D
Reference contents:
– Using Jenkins for distributed builds on Compute Engine | Cloud Architecture Center
QUESTION 14
You need to update a deployment in Google Cloud Deployment Manager without any resource downtime in the deployment.
Which command should you use?
- A. gcloud deployment-manager deployments create –config <deployment-config-path>
- B. gcloud deployment-manager deployments update –config <deployment-config-path>
- C. gcloud deployment-manager resources create –config <deployment-config-path>
- D. gcloud deployment-manager resources update –config <deployment-config-path>
Correct Answer: B
Reference contents:
– gcloud deployment-manager deployments update | Google Cloud CLI Documentation
QUESTION 15
You need to run an important query in BigQuery but expect it to return a lot of records.
You want to find out how much it will cost to run the query. You are using on-demand pricing.
What should you do?
- A. Arrange to switch to Flat-Rate pricing for this query, then move back to on-demand.
- B. Use the command line to run a dry run query to estimate the number of bytes read. Then convert that bytes estimate to dollars using the Pricing Calculator.
- C. Use the command line to run a dry run query to estimate the number of bytes returned. Then convert that bytes estimate to dollars using the Google Cloud Pricing Calculator.
- D. Run a select count (*) to get an idea of how many records your query will look through. Then convert that number of rows to dollars using the Pricing Calculator.
Correct Answer: B
Reference contents:
– Estimate storage and query costs | BigQuery | Google Cloud
– #On-demand analysis pricing – Pricing | BigQuery: Cloud Data Warehouse
QUESTION 16
You have a single binary application that you want to run on Google Cloud Platform.
You decided to automatically scale the application based on underlying infrastructure CPU usage. Your organizational policies require you to use virtual machines directly. You need to ensure that the application scaling is operationally efficient and completed as quickly as possible.
What should you do?
- A. Create a Google Kubernetes Engine cluster, and use horizontal pod autoscaling to scale the application.
- B. Create an instance template, and use the template in a managed instance group with autoscaling configured.
- C. Create an instance template, and use the template in a managed instance group that scales up and down based on the time of day.
- D. Use a set of third-party tools to build automation around scaling the application up and down, based on Stackdriver CPU usage monitoring.
Correct Answer: B
QUESTION 17
You are analyzing Google Cloud Platform service costs from three separate projects.
You want to use this information to create service cost estimates by service type, daily and monthly, for the next six months using standard query syntax.
What should you do?
- A. Export your bill to a Google Cloud Storage bucket, and then import into Google Cloud Bigtable for analysis.
- B. Export your bill to a Google Cloud Storage bucket, and then import into Google Sheets for analysis.
- C. Export your transactions to a local file, and perform analysis with a desktop tool.
- D. Export your bill to a BigQuery dataset, and then write time window-based SQL queries for analysis.
Correct Answer: D
Reference contents:
– Export Cloud Billing data to BigQuery
– Analyzing Google Cloud Billing Data with BigQuery | by Christopher Grant
QUESTION 18
You need to set up a policy so that videos stored in a specific Google Cloud Storage Regional bucket are moved to Coldline after 90 days, and then deleted after one year from their creation.
How should you set up the policy?
- A. Use Google Cloud Storage Object Lifecycle Management using Age conditions with SetStorageClass and Delete actions. Set the SetStorageClass action to 90 days and the Delete action to 275 days (365).
- B. Use Google Cloud Storage Object Lifecycle Management using Age conditions with SetStorageClass and Delete actions. Set the SetStorageClass action to 90 days and the Delete action to 365 days.
- C. Use gsutil rewrite and set the Delete action to 275 days (365-90).
- D. Use gsutil rewrite and set the Delete action to 365 days.
Correct Answer: B
Reference contents:
– Storage classes | Google Cloud
– #Age – Object Lifecycle Management | Cloud Storage
QUESTION 19
You have a Linux VM that must connect to Google Cloud SQL.
You created a service account with the appropriate access rights. You want to make sure that the VM uses this service account instead of the default Google Compute Engine service account.
What should you do?
- A. When creating the VM via the web console, specify the service account under the Identity and API Access section.
- B. Download a JSON Private Key for the service account. On the Project Metadata, add that JSON as the value for the key compute-engine-service- account.
- C. Download a JSON Private Key for the service account. On the Custom Metadata of the VM, add that JSON as the value for the key compute-engine- service-account.
- D. Download a JSON Private Key for the service account. After creating the VM, ssh into the VM and save the JSON under ~/.gcloud/compute-engine-service- account.json.
Correct Answer: A
Reference contents:
– #Changing the service account and access scopes for an instance – Creating and enabling service accounts for instances | Compute Engine Documentation | Google Cloud
QUESTION 20
You created an instance of SQL Server 2017 on Google Compute Engine to test features in the new version.
You want to connect to this instance using the fewest number of steps.
What should you do?
- A. Install a RDP client on your desktop. Verify that a firewall rule for port 3389 exists.
- B. Install a RDP client in your desktop. Set a Windows username and password in the Google Cloud Console. Use the credentials to log in to the instance.
- C. Set a Windows password in the Google Cloud Console. Verify that a firewall rule for port 22 exists. Click the RDP button in the Google Cloud Console and supply the credentials to log in.
- D. Set a Windows username and password in the Google Cloud Console. Verify that a firewall rule for port 3389 exists. Click the RDP button in the Google Cloud Console, and supply the credentials to log in.
Correct Answer: D
Reference contents:
– #Connect to the VM instance by using RDP – Setting up Chrome Remote Desktop for Windows on Compute Engine | Cloud Architecture Center | Google Cloud
– Troubleshooting RDP | Compute Engine Documentation | Google Cloud
QUESTION 21
You have one GCP account running in your default region and zone and another account running in a non-default region and zone.
You want to start a new Google Compute Engine instance in these two Google Cloud Platform accounts using the command line interface.
What should you do?
- A. reate two configurations using gcloud config configurations create [NAME]. Run gcloud config configurations activate [NAME] to switch between accounts when running the commands to start the Google Compute Engine instances.
- B. Create two configurations using gcloud config configurations create [NAME]. Run gcloud configurations list to start the Google Compute Engine instances.
- C. Activate two configurations using gcloud configurations activate [NAME]. Run gcloud config list to start the Google Compute Engine instances. D. Activate two configurations using gcloud configurations activate [NAME]. Run gcloud configurations list to start the Google Compute Engine instances.
Correct Answer: A
Reference contents:
– #Activating a configuration – Managing gcloud CLI configurations | Google Cloud CLI Documentation
– How to use multiple accounts with gcloud | by Fatima Silveira | Google Cloud – Community | Medium
QUESTION 22
You significantly changed a complex Google Cloud Deployment Manager template and want to confirm that the dependencies of all defined resources are properly met before committing it to the project.
You want the most rapid feedback on your changes.
What should you do?
- A. Use granular logging statements within a Google Cloud Deployment Manager template authored in Python.
- B. Monitor activity of the Google Cloud Deployment Manager execution on the Stackdriver Logging page of the Google Cloud Console.
- C. Execute the Google Cloud Deployment Manager template against a separate project with the same configuration, and monitor for failures.
- D. Execute the Google Cloud Deployment Manager template using the -preview option in the same project, and observe the state of interdependent resources.
Correct Answer: D
Reference contents:
– Updating a Deployment | Cloud Deployment Manager Documentation | Google Cloud
QUESTION 23
You are building a pipeline to process time-series data.
Which Google Cloud Platform services should you put in boxes 1,2,3, and 4?
- A.
- 1. Google Cloud Pub/Sub
2. Google Cloud Dataflow
3. Google Cloud Datastore
4. BigQuery
- 1. Google Cloud Pub/Sub
- B.
- 1. Firebase Messages
2. Google Cloud Pub/Sub
3. Google Cloud Spanner
4. BigQuery
- 1. Firebase Messages
- C.
- 1. Google Cloud Pub/Sub
2. Google Cloud Storage
3. BigQuery
4. Google Cloud Bigtable
- 1. Google Cloud Pub/Sub
- D.
- 1. Google Cloud Pub/Sub
2. Google Cloud Dataflow
3. Google Cloud Bigtable
4. BigQuery
- 1. Google Cloud Pub/Sub
Correct Answer: D
Reference contents:
– Correlating Thousands of Financial Time Series Streams in Real Time | Cloud Architecture Center | Google Cloud
QUESTION 24
You have a project for your App Engine application that serves a development environment.
The required testing has succeeded and you want to create a new project to serve as your production environment.
What should you do?
- A. Use gcloud to create the new project, and then deploy your application to the new project.
- B. Use gcloud to create the new project and to copy the deployed application to the new project.
- C. Create a Google Cloud Deployment Manager configuration file that copies the current Google App Engine deployment into a new project.
- D. Deploy your application again using gcloud and specify the project parameter with the new project name to create the new project.
Correct Answer: A
Reference contents:
– gcloud app deploy | Google Cloud CLI Documentation
QUESTION 25
You need to configure IAM access audit logging in BigQuery for external auditors.
You want to follow Google-recommended practices.
What should you do?
- A. Add the auditors group to the logging.viewer and bigQuery.dataViewer predefined IAM roles.
- B. Add the auditors group to two new custom IAM roles.
- C. Add the auditor user accounts to the logging.viewer and bigQuery.dataViewer predefined IAM roles.
- D. Add the auditor user accounts to two new custom IAM roles.
Correct Answer: A
Reference contents:
– #Scenario: External auditors – IAM roles for auditing-related job functions | IAM Documentation | Google Cloud
QUESTION 26
You need to set up permissions for a set of Google Compute Engine instances to enable them to write data into a particular Google Cloud Storage bucket.
You want to follow Google-recommended practices.
What should you do?
- A. Create a service account with an access scope. Use the access scope https://www.googleapis.com/auth/devstorage.write_only.
- B. Create a service account with an access scope. Use the access scope https://www.googleapis.com/auth/cloud-platform.
- C. Create a service account and add it to the IAM role storage.objectCreator for that bucket.
- D. Create a service account and add it to the IAM role storage.objectAdmin for that bucket.
Correct Answer: C
Reference contents:
– Cloud Storage authentication
– Identity and Access Management | Cloud Storage
QUESTION 27
You have sensitive data stored in three Google 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?
- A. Using the Google Cloud Console, filter the Activity log to view the information.
- B. Using the Google Cloud Console, filter the Stackdriver log to view the information.
- C. View the bucket in the Google Cloud Storage section of the Google Cloud Console.
- D. Create a trace in Stackdriver to view the information.
Correct Answer: B
QUESTION 28
You are the project owner of a GCP project and want to delegate control to colleagues to manage buckets and files in Google Cloud Storage.
You want to follow Google- recommended practices.
Which IAM roles should you grant your colleagues?
- A. Project Editor
- B. Storage Admin
- C. Storage Object Admin
- D. Storage Object Creator
Correct Answer: B
QUESTION 29
You have an object in a Google 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?
- A. Create a signed URL with a four-hour expiration and share the URL with the company.
- B. Set object access to public and use object lifecycle management to remove the object after four hours.
- C. Configure the Google Cloud Storage bucket as a static web-site and furnish the objects URL to the company. Delete the object from the Google Cloud Storage bucket after four hours.
- D. Create a new Google Cloud Storage bucket specifically for the external company to access. Copy the object to that bucket. Delete the bucket after four hours have passed.
Correct Answer: A
Reference contents:
– Signed URLs | Cloud Storage
QUESTION 30
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?
- A. Deploy the monitoring pod in a StatefulSet object.
- B. Deploy the monitoring pod in a DaemonSet object.
- C. Reference the monitoring pod in a Deployment object.
- D. Reference the monitoring pod in a cluster initializer at the GKE cluster creation time.
Correct Answer: B
Reference contents:
– DaemonSet | Kubernetes Engine Documentation | Google Cloud
– DaemonSet | Kubernetes
QUESTION 31
You want to send and consume Cloud Pub/Sub messages from your Google App Engine application.
The Google 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 Google Cloud Pub/Sub.
What should you do?
- A. Enable the Google Cloud Pub/Sub API in the API Library on the Google Cloud Console.
- B. Rely on the automatic enablement of the Google Cloud Pub/Sub API when the Service Account accesses it.
- C. Use Google Cloud Deployment Manager to deploy your application. Rely on the automatic enablement of all APIs used by the application being deployed.
- D. Grant the Google App Engine Default service account the role of Google Cloud Pub/Sub Admin. Have your application enable the API on the first connection to Google Cloud Pub/ Sub.
Correct Answer: A
Reference contents:
– Quickstart: Create a Pub/Sub topic by using the Cloud Console
QUESTION 32
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.
- 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.
- C. Configure a single Stackdriver account, and link all projects to the same account.
- 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.
Correct Answer: C
Reference contents:
– Using Stackdriver Workspaces to help manage your hybrid and multicloud environment | Google Cloud Blog
QUESTION 33
You are deploying an application to a Google 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.
- B. Set autoscaling to Off, set the minimum number of instances to 1, and then set the maximum number of instances to 1.
- C. Set autoscaling to On, 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.
Correct Answer: A
Reference contents:
– Autoscaling groups of instances | Compute Engine Documentation | Google Cloud
QUESTION 34
You want to verify the IAM users and roles assigned within a GCP project named my-project.
What should you do?
- A. Run gcloud iam roles list. Review the output section.
- B. Run gcloud iam service-accounts list. Review the output section.
- C. Navigate to the project and then to the IAM section in the Google Cloud Console. Review the members and roles.
- D. Navigate to the project and then to the Roles section in the Google Cloud Console. Review the roles and status.
Correct Answer: C
QUESTION 35
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.
- 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.
- 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.
- D. Verify that you are Billing Administrator for the billing account. Update the existing project to link it to the existing billing account.
Correct Answer: A
QUESTION 36
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.
- B. Download the private key from the service account, and add the private key to each VMs SSH keys.
- C. Grant the service account the IAM Role of Compute Storage Admin in the project called proj-vm.
- D. When creating the VMs, set the service accounts API scope for Google Compute Engine to read/write.
Correct Answer: C
QUESTION 37
You created a Google Cloud Platform project with a Google 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.
- B. Change the region property setting in the existing Google App Engine application from us-central to asia-northeast1.
- C. Create a second Google App Engine application in the existing GCP project and specify asia-northeast1 as the region to serve your application.
- D. Create a new GCP project and create an Google App Engine application inside this new project. Specify asia-northeast1 as the region to serve your application.
Correct Answer: D
Reference contents:
– #Creating a project and application – Managing Google Cloud Projects, App Engine Applications, and Billing | App Engine flexible environment for Node.js docs
– Managing Google Cloud Projects, App Engine Applications, and Billing | App Engine flexible environment for Node.js docs
QUESTION 38
You need to grant access for three users so that they can view and edit table data on a Google Cloud Spanner instance.
What should you do?
- A. Run gcloud iam roles describe roles/spanner.databaseUser. Add the users 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.
- C. Run gcloud iam roles describe roles/spanner.viewer – -project my-project. Add the users 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.
Correct Answer: B
QUESTION 39
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.
- B. Enable the Node Auto-Upgrades feature for your GKE cluster.
- C. Select the latest available cluster version for your GKE cluster.
- D. Select Container-Optimized OS (cos) as a node image for your GKE cluster.
Correct Answer: B
QUESTION 40
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.
- B. Configure an internal TCP load balancer.
- C. Configure an external SSL proxy load balancer.
- D. Configure an external TCP proxy load balancer.
Correct Answer: A
Reference contents:
– External HTTP(S) Load Balancing overview | Google Cloud
– Choosing a load balancer
QUESTION 41
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 Google Cloud Console to transfer the file instead of gsutil.
- B. Enable parallel composite uploads using gsutil on the file transfer.
- C. Decrease the TCP window size on the machine initiating the transfer.
- D. Change the storage class of the bucket from Nearline to Multi-Regional.
Correct Answer: B
Reference contents:
– #Parallel composite uploads – Uploads and downloads | Cloud Storage
QUESTION 42
You’ve deployed a microservice called myapp1 to a Google Kubernetes Engine cluster using the YAML file specified below:
apiVersion: apps/vi
kind: Deployment
metadata:
name: myappl-deployment
spec:
selector:
matchLabels:
app: myapp1
replicas: 2
template:
metadata:
labels:
app: myappi
spec: containers:
- name: main-container
image: gcr.io/my-company-repo/myappi:1.4
env:
- name: DB_PASSWORD
value: "tough2guess!"
ports: - containerPort: 8080
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.
- B. Store the database password inside a Secret object. Modify the YAML file to populate the DB_PASSWORD environment variable from the Secret.
- C. Store the database password inside a ConfigMap object. Modify the YAML file to populate the DB_PASSWORD environment variable from the ConfigMap.
- 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.
Correct Answer: B
Reference contents:
– Secrets | Kubernetes Engine Documentation | Google Cloud
– Using Secrets to store sensitive data | Config Connector Documentation | Google Cloud
QUESTION 43
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 than 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.
- B. Decrease the maximum number of instances to 3.
- C. Use a TCP health check instead of an HTTP health check.
- D. Increase the initial delay of the HTTP health check to 200 seconds.
Correct Answer: D
QUESTION 44
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.
- B. Select Google Kubernetes Engine. Use a three-node cluster with micro instance types.
- C. Select Google Compute Engine. Use preemptible VM instances of the appropriate standard machine type.
- D. Select Google Compute Engine. Use VM instance types that support micro bursting.
Correct Answer: C
Reference contents:
– Preemptible VM instances | Compute Engine Documentation | Google Cloud
QUESTION 45
You recently deployed a new version of an application to Google 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.
- B. On the Google App Engine page of the Google Cloud Console, select the application that needs to be reverted and click Revert.
- C. On the Google App Engine Versions page of the Google Cloud Console, route 100% of the traffic to the previous version.
- D. Deploy the original version as a separate application. Then go to Google App Engine settings and split traffic between applications so that the original version serves 100% of the requests.
Correct Answer: C
Reference contents:
– Splitting Traffic | App Engine standard environment for Python 2 | Google Cloud
– Migrating Traffic | App Engine flexible environment for Python docs | Google Cloud
– Rollbacks, gradual rollouts, and traffic migration | Cloud Run Documentation
QUESTION 46
You deployed an Google 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.
- B. Check the web-application.xml file for your application and check project settings.
- C. Go to Google Cloud Deployment Manager and review settings for deployment of applications.
- D. Go to Google Cloud Shell and run gcloud config list to review the Google Cloud configuration used for deployment.
Correct Answer: D
Reference contents:
– #Error messages about rollout_strategy – Troubleshooting App Engine flexible deployment | Cloud Endpoints with OpenAPI
QUESTION 47
You want to configure 10 Google 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.
- 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.
- C. Create an instance group for the instances. Set the Autohealing health check to healthy (HTTP).
- 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.
Correct Answer: A
Reference contents:
– Set VM availability policies | Compute Engine Documentation | Google Cloud
QUESTION 48
You host a static web-site on Google 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 Google Cloud CDN on the web-site frontend.
- B. Enable Share publicly on the PDF file objects.
- C. Set Content-Type metadata to application/pdf on the PDF file objects.
- D. Add a label to the storage bucket with a key of Content-Type and value of application/pdf.
Correct Answer: C
Reference contents:
– #Content-Type – Object metadata | Cloud Storage
QUESTION 49
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.
- B. Use gcloud to add metadata to the VM. Set the key to required-memory-size and the value to 8 GB.
- C. Stop the VM, change the machine type to n1-standard-8, and start the VM.
- D. Stop the VM, increase the memory to 8 GB, and start the VM.
Correct Answer: D
Reference contents:
– #Add extended memory to an existing VM instance – Create a VM with a custom machine type | Compute Engine Documentation | Google Cloud
QUESTION 50
You have production and test workloads that you want to deploy on Google 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.
- B. Create a single custom VPC with 2 subnets. Create each subnet in the same region and with the same CIDR range.
- C. Create 2 custom VPCs, each with a single subnet. Create each subnet in a different region and with a different 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.
Correct Answer: AReference contents:
– #Working with subnets – Quickstart: Create and modify Virtual Private Cloud (VPC) networks
Comments are closed