A. Generate a new SSH key pair. Give the private key to each member of your team. Configure the public A. Create an HTTP load balancer with a backend configuration that references an existing instance group.
key in the metadata of each instance. Set the health check to healthy (HTTP)
B. Ask each member of the team to generate a new SSH key pair and to send you their public key. Use a B. Create an HTTP load balancer with a backend configuration that references an existing instance group.
conf iguration management tool to deploy those keys on each instance. Def ine a balancing mode and set the maximum RPS to 10.
C. Ask each member of the team to generate a new SSH key pair and to add the public key to their Google C. Create a managed instance group. Set the Autohealing health check to healthy (HTTP)
account. Grant the “compute.osAdminLogin” role to the Google group corresponding to this team. D. Create a managed instance group. Verify that the autoscaling setting is on.
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 Cloud Platform project and allow project-wide public S SH Correct Answer: C
keys on each instance. Section: (none)
Explanation
Correct Answer: C
Section: (none) Explanation/Reference:
Explanation
Explanation/Reference: QUESTION 5
Ref erence: https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys You are using multiple configurations for gcloud. You want to review the configured Kubernetes Engine
cluster of an inactive configuration using the fewest possible steps. What should you do?
QUESTION 2
You need to create a custom VPC with a single subnet. The subnet’s range must be as large as possible. A. Use gcloud config configurations describe to review the output.
Which range should you use?
B. Use gcloud config configurations activate and gcloud config list to review the output.
A. 0.0.0.0/0 C. Use kubectl config get-contexts to review the output.
B. 10.0.0.0/8 D. Use kubectl config use-context and kubectl config view to review the output.
C. 172.16.0.0/12
D. 192.168.0.0/16 Correct Answer: D
Section: (none)
Explanation
Correct Answer: B
Section: (none)
Explanation/Reference:
Explanation
Ref erence: https://medium.com/google-cloud/kubernetes-engine-kubectl-config-b6270d2b656c
Explanation/Reference: QUESTION 6
Your company uses Cloud Storage to store application backup files for disaster recovery purposes. You want
to f ollow Google’s recommended practices. Which storage option should you use?
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 A. Multi-Regional Storage
recovery. What should you do? B. Regional Storage
C. Nearline Storage
A. Select Cloud SQL (MySQL). Verify that the enable binary logging option is selected. D. Coldline Storage
B. Select Cloud SQL (MySQL). Select the create failover replicas option.
C. Select Cloud Spanner. Set up your instance with 2 nodes. Correct Answer: D
Section: (none)
D. Select Cloud Spanner. Set up your instance as multi-regional.
Explanation
Correct Answer: A Explanation/Reference:
Section: (none) Ref erence: https://cloud.google.com/storage/docs/storage-classes#nearline
Explanation
QUESTION 7 QUESTION 10
Several employees at your company have been creating projects with Cloud Platform and paying for it with You have a development project with appropriate IAM roles defined. You are creating a production project
their personal credit cards, which the company reimburses. The company wants to centralize all these and want to have the same IAM roles on the new project, using the fewest possible steps. What should you
projects under a single, new billing account. What should you do? do?
A. Contact [email protected] with your bank account details and request a corporate billing account A. Use gcloud iam roles copy and specify the production project as the destination project.
f or your company. B. Use gcloud iam roles copy and specify your organization as the destination organization.
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 Cloud Platform Console, use the ‘create role from role’ functionality.
C. In the Google Platform Console, go to the Resource Manage and move all projects to the root
D. In the Google Cloud Platform Console, use the ‘create role’ functionality and select all applicable
Organizarion.
permissions.
D. In the Google Cloud Platform Console, create a new billing account and set up a payment method.
Correct Answer: A
Correct Answer: D Section: (none)
Section: (none) Explanation
Explanation
Explanation/Reference:
Explanation/Reference: Ref erence: https://cloud.google.com/sdk/gcloud/reference/iam/roles/copy
Ref erence: https://www.whizlabs.com/blog/google-cloud-interview-questions/
QUESTION 11
QUESTION 8 You need a dynamic way of provisioning VMs on Compute Engine. The exact specifications will be in a
You have an application that looks for its licensing server on the IP 10.0.3.21. You need to deploy the dedicated configuration file. You want to follow Google’s recommended practices. Which method should you
licensing server on Compute Engine. You do not want to change the configuration of the application and want use?
the application to be able to reach the licensing server. What should you do?
A. Deployment Manager
A. Reserve the IP 10.0.3.21 as a static internal IP address using gcloud and assign it to the licensing B. Cloud Composer
server.
C. Managed Instance Group
B. Reserve the IP 10.0.3.21 as a static public IP address using gcloud and assign it to the licensing server.
D. Unmanaged Instance Group
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 Correct Answer: A
IP address. Section: (none)
Explanation
Correct Answer: A
Section: (none) Explanation/Reference:
Explanation Ref erence: https://cloud.google.com/compute/docs/instances/
Explanation/Reference: QUESTION 12
You have a Dockerfile that you need to deploy on Kubernetes Engine. What should you do?
QUESTION 14
You need to update a deployment in Deployment Manager without any resource downtime in the deployment. QUESTION 17
Which command should you use? You are analyzing Google Cloud Platform service costs from three separate projects. You want to use this
inf ormation to create service cost estimates by service type, daily and monthly, for the next six months using
A. gcloud deployment-manager deployments create --config <deployment-config-path> standard query syntax. What should you do?
B. gcloud deployment-manager deployments update --config <deployment-config-path>
A. Export your bill to a Cloud Storage bucket, and then import into Cloud Bigtable for analysis.
C. gcloud deployment-manager resources create --config <deployment-config-path>
B. Export your bill to a Cloud Storage bucket, and then import into Google Sheets for analysis.
D. gcloud deployment-manager resources update --config <deployment-config-path>
C. Export your transactions to a local file, and perform analysis with a desktop tool.
Correct Answer: B D. Export your bill to a BigQuery dataset, and then write time window-based SQL queries for analysis.
Section: (none)
Explanation Correct Answer: D
Section: (none)
Explanation/Reference: Explanation
Ref erence: https://cloud.google.com/sdk/gcloud/reference/deployment-manager/deployments/update
Explanation/Reference:
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? QUESTION 18
You need to set up a policy so that videos stored in a specific Cloud Storage Regional bucket are moved to
A. Arrange to switch to Flat-Rate pricing for this query, then move back to on-demand. Coldline after 90 days, and then deleted after one year f rom their creation. How should you set up the policy?
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. A. Use 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 – 90)
C. Use the command line to run a dry run query to estimate the number of bytes returned. Then convert that
B. Use Cloud Storage Object Lifecycle Management using Age conditions with SetStorageClass and Delete
bytes estimate to dollars using the Pricing Calculator.
actions. Set the SetStorageClass action to 90 days and the Delete action to 365 days.
D. Run a select count (*) to get an idea of how many records your query will look through. Then
C. Use gsutil rewrite and set the Delete action to 275 days (365-90).
convert that number of rows to dollars using the Pricing Calculator.
D. Use gsutil rewrite and set the Delete action to 365 days.
Correct Answer: B
Section: (none) Correct Answer: B
Explanation Section: (none)
Explanation
Explanation/Reference:
Ref erence: https://cloud.google.com/bigquery/docs/estimate-costs Explanation/Reference:
QUESTION 16
You have a single binary application that you want to run on Google Cloud Platform. You decided to QUESTION 19
automatically scale the application based on underlying infrastructure CPU usage. Your organizational You have a Linux VM that must connect to Cloud SQL. You created a service account with the appropriat e
policies require you to use virtual machines directly. You need to ensure that t he application scaling is access rights. You want to make sure that the VM uses this service account instead of the default Compute
operationally efficient and completed as quickly as possible. What should you do? 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. Explanation/Reference:
B. Download a JSON Private Key for the service account. On the Project Metadata, add that JSON as the Ref erence: https://cloud.google.com/sdk/gcloud/reference/config/configurations/activate
value f or the key compute-engine-service-account.
QUESTION 22
C. Download a JSON Private Key for the service account. On the Custom Metadata of the VM, add that You significantly changed a complex Deployment Manager template and want to confirm that the
JSON as the value for the key compute-engine-service-account. dependencies of all defined resources are properly met before committing it to the project. You want the
D. Download a JSON Private Key for the service account. After creating the VM, ssh into the VM and save most rapid feedback on your changes. What should you do?
the JSON under ~/.gcloud/compute-engine-service-account.json.
A. Use granular logging statements within a Deployment Manager template authored in Python.
Correct Answer: A B. Monitor activity of the Deployment Manager execution on the Stackdriver Logging page of the GCP
Section: (none) Console.
Explanation C. Execute the Deployment Manager template against a separate project with the same configuration, and
monitor for failures.
Explanation/Reference:
Ref erence: https://cloud.google.com/compute/docs/access/create-enable-service-accounts-for-instances D. Execute the Deployment Manager template using the –-preview option in the same project, and
observe the state of interdependent resources.
QUESTION 20
You created an instance of SQL Server 2017 on Compute Engine to test features in the new version. You Correct Answer: D
want to connect to this instance using the fewest number of steps. What should you do? Section: (none)
Explanation
A. Install a RDP client on your desktop. Verify that a f irewall rule for port 3389 exists.
B. Install a RDP client in your desktop. Set a Windows username and password in the GCP Console. Use Explanation/Reference:
the credentials to log in to the instance. Most Voted Ref erence: https://cloud.google.com/deployment-manager/docs/deployments/updating-deployments
C. Set a Windows password in the GCP Console. Verify that a f irewall rule for port 22 exists. Click the RDP QUESTION 23
button in the GCP Console and supply the credentials to log in. You are building a pipeline to process time-series data. Which Google Cloud Platform services should you
D. Set a Windows username and password in the GCP Console. Verify that a firewall rule f or port 3389 put in boxes 1,2,3, and 4?
exists. Click the RDP button in the GCP Console, and supply the credentials to log in. Most Voted
Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
Ref erence: https://medium.com/falafel-software/sql-server-in-the-google-cloud-a17e8a1f11ce
QUESTION 21
You have one GCP account running in your default region and zone and another account running in a non-
def ault region and zone. You want to start a new Compute Engine instance in these two Google Cloud
Platf orm accounts using the command line interface. What should you do?
A. Create 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 Compute Engine instances.
B. Create two configurations using gcloud config configurations create [NAME]. Run gcloud
configurations list to start the Compute Engine instances.
C. Activate two configurations using gcloud configurations activate [NAME]. Run gcloud
config list to start the Compute Engine instances.
D. Activate two configurations using gcloud configurations activate [NAME]. Run gcloud
configurations list to start the Compute Engine instances. A. Cloud Pub/Sub, Cloud Dataflow, Cloud Datastore, BigQuery
B. Firebase Messages, Cloud Pub/Sub, Cloud Spanner, BigQuery
Correct Answer: A C. Cloud Pub/Sub, Cloud Storage, BigQuery, Cloud Bigtable
Section: (none) D. Cloud Pub/Sub, Cloud Dataflow, Cloud Bigtable, BigQuery
Explanation Correct Answer: D
Section: (none)
Explanation
Section: (none)
Explanation
Explanation/Reference:
Ref erence: https://cloud.google.com/solutions/correlating-time-series-dataflow Explanation/Reference:
Ref erence: https://towardsdatascience.com/enlightened-datalab-notebooks-35ce8ef374c0
QUESTION 24
You have a project for your App Engine application that serves a development environment. The required QUESTION 27
testing has succeeded and you want to create a new project to serve as your production environment. What You have sensitive data stored in three Cloud Storage buckets and have enabled data access logging. You
should you do? want to verify activities for a particular user for these buckets, using the fewest possible steps. You need to
verif y the addition of metadata labels and which files have been viewed from those buckets. What should
A. Use gcloud to create the new project, and then deploy your application to the new project. you do?
B. Use gcloud to create the new project and to copy the deployed application to the new project.
C. Create a Deployment Manager configuration file that copies the current App Engine deployment into a A. Using the GCP Console, f ilter the Activity log to view the information.
new project. B. Using the GCP Console, filter the Stackdriver log to view the information.
D. Deploy your application again using gcloud and specify the project parameter with the new project name C. View the bucket in the Storage section of the GCP Console.
to create the new project. D. Create a trace in Stackdriver to view the information.
Correct Answer: A Correct Answer: A
Section: (none) Section: (none)
Explanation
Explanation
Explanation/Reference: Explanation/Reference:
QUESTION 25 QUESTION 28
You need to configure IAM access audit logging in BigQuery for external auditors. You want to follow Google- You are the project owner of a GCP project and want to delegate control to colleagues to manage buckets
recommended practices. What should you do? and f iles in Cloud Storage. You want to follow Google-recommended practices. Which IAM roles should you
grant your colleagues?
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. A. Project Editor
C. Add the auditor user accounts to the ‘logging.viewer’ and ‘bigQuery.dataViewer’ predefined IAM roles. B. Storage Admin
D. Add the auditor user accounts to two new custom IAM roles. C. Storage Object Admin
D. Storage Object Creator
Correct Answer: A
Section: (none) Correct Answer: B
Explanation Section: (none)
Explanation
Explanation/Reference:
Ref erence: https://cloud.google.com/iam/docs/roles-audit-logging Explanation/Reference:
QUESTION 26
You need to set up permissions for a set of Compute Engine instances to enable them to write data into a
QUESTION 29
particular Cloud Storage bucket. You want to follow Google-recommended practices. What should you do? 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
A. Create a service account with an access scope. Use the access scope ‘https://www.googleapis.com/auth/ company does not have a Google account to which you can grant specific user-based access privileges. You
devstorage.write_only’. want to use the most secure method that requires the fewest steps. What should you do?
B. Create a service account with an access scope. Use the access scope ‘https://www.googleapis.com/auth/
cloud-platform’. A. Create a signed URL with a four-hour expiration and share the URL with the company.
C. Create a service account and add it to the IAM role ‘storage.objectCreator’ for that bucket. B. Set object access to ‘public’ and use object lifecycle management to remove the object af ter four hours.
D. Create a service account and add it to the IAM role ‘storage.objectAdmin’ for that bucket. C. Conf igure the storage bucket as a static website and furnish the object’s URL to the company. Delete the
object from the storage bucket after f our hours.
Correct Answer: C D. 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.
Correct Answer: A
Section: (none) Explanation
Explanation
Explanation/Reference:
Explanation/Reference:
QUESTION 33
QUESTION 30 You are deploying an application to a Compute Engine VM in a managed instance group. The application
You are creating a Google Kubernetes Engine (GKE) cluster with a cluster autoscaler f eature enabled. You must be running at all times, but only a single instance of the VM should run per GCP project. How should
need to make sure that each node of the cluster will run a monitoring pod that sends container metrics t o a you configure the instance group?
third-party monitoring solution. What should you do?
A. Set autoscaling to On, set the minimum number of instances to 1, and then set the maximum number of
A. Deploy the monitoring pod in a StatefulSet object. instances to 1.
B. Deploy the monitoring pod in a DaemonSet object. B. Set autoscaling to Off, set the minimum number of instances to 1, and then set the maximum number of
C. Ref erence the monitoring pod in a Deployment object. instances to 1.
D. Ref erence the monitoring pod in a cluster initializer at the GKE cluster creation time. C. Set autoscaling to On, set the minimum number of instances to 1, and then set the maximum number of
instances to 2.
Correct Answer: B D. Set autoscaling to Off, set the minimum number of instances to 1, and then set the maximum number of
Section: (none) instances to 2.
Explanation
Correct Answer: A
Explanation/Reference: Section: (none)
Explanation
QUESTION 31 Explanation/Reference:
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? QUESTION 34
You want to verify the IAM users and roles assigned within a GCP project named my-project. What should
A. Enable the Cloud Pub/Sub API in the API Library on the GCP Console. you do?
B. Rely on the automatic enablement of the Cloud Pub/Sub API when the Service Account accesses it.
A. Run gcloud iam roles list. Review the output section.
C. Use Deployment Manager to deploy your application. Rely on the automatic enablement of all APIs used
by the application being deployed. B. Run gcloud iam service-accounts list. Review the output section.
D. Grant the App Engine Default service account the role of Cloud Pub/Sub Admin. Have your application C. Navigate to the project and then to the IAM section in the GCP Console. Review the members and roles.
enable the API on the first connection to Cloud Pub/Sub. D. Navigate to the project and then to the Roles section in the GCP Console. Review the roles and status.
Explanation/Reference: Explanation/Reference:
QUESTION 32 QUESTION 35
You need to monitor resources that are distributed over different projects in Google Cloud Platform. You You need to create a new billing account and then link it with an existing Google Cloud Platform project.
want to consolidate reporting under the same Stackdriver Monitoring dashboard. What should you do? What should you do?
A. Use Shared VPC to connect all projects, and link Stackdriver to one of the projects. A. Verif y that you are Project Billing Manager for the GCP project. Update the existing project to link it to the
B. For each project, create a Stackdriver account. In each project, create a service account for that project existing billing account. Most Voted
and grant it the role of Stackdriver Account Editor in all other projects. B. Verif y that you are Project Billing Manager for the GCP project. Create a new billing account and link the
C. Conf igure a single Stackdriver account, and link all projects to the same account. new billing account to the existing project. Most Voted
D. Conf igure a single Stackdriver account for one of the projects. In Stackdriver, create a Group and add the C. Verif y that you are Billing Administrator for the billing account. Create a new project and link the new
other project names as criteria for that Group. project to the existing billing account.
D. Verif y that you are Billing Administrator for the billing account. Update the existing project to link it to the
Correct Answer: C existing billing account.
Section: (none)
Correct Answer: B users to a new group. Add the group to the role.
Section: (none)
Explanation Correct Answer: B
Section: (none)
Explanation/Reference: Explanation
Ref erence: https://cloud.google.com/billing/docs/how-to/modify-project
Explanation/Reference:
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- QUESTION 39
vm. What should you do? 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. 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 VM’s SSH keys. A. Enable the Node Auto-Repair feature for your GKE cluster.
C. Grant the service account the IAM Role of Compute Storage Admin in the project called proj-vm. B. Enable the Node Auto-Upgrades feature for your GKE cluster.
D. When creating the VMs, set the service account’s API scope for Compute Engine to read/write. 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: C
Section: (none) Correct Answer: B
Explanation Section: (none)
Explanation
Explanation/Reference:
Explanation/Reference:
QUESTION 37
You created a Google Cloud Platform project with an App Engine application inside the project. You initially QUESTION 40
conf igured the application to be served from the us-central region. Now you want the application to be served You have an instance group that you want to load balance. You want the load balancer to terminate the client
f rom the asia-northeast1 region. What should you do? 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. Change the default region property setting in the existing GCP project to asia-northeast1.
B. Change the region property setting in the existing App Engine application from us -central to asia- A. Conf igure an HTTP(S) load balancer.
northeast1. B. Conf igure an internal TCP load balancer.
C. Create a second App Engine application in the existing GCP project and specify asia-northeast1 as the C. Conf igure an external SSL proxy load balancer.
region to serve your application. D. Conf igure an external TCP proxy load balancer.
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. Correct Answer: A
Section: (none)
Correct Answer: D Explanation
Section: (none)
Explanation Explanation/Reference:
Ref erence: https://cloud.google.com/load-balancing/docs/https/
Explanation/Reference:
QUESTION 41
You have 32 GB of data in a single file that you need to upload to a Nearline Storage bucket. The WAN
QUESTION 38 connection you are using is rated at 1 Gbps, and you are the only one on the connection. You want to use as
You need to grant access for three users so that they can view and edit table data on a Cloud Spanner much of the rated 1 Gbps as possible to transfer the file rapidly. How should you upload the file?
instance. What should you do?
A. Use the GCP Console to transfer the file instead of gsutil.
A. Run gcloud iam roles describe roles/spanner.databaseUser. Add the users to the role. B. Enable parallel composite uploads using gsutil on the file transfer.
B. Run gcloud iam roles describe roles/spanner.databaseUser. Add the users to a new C. Decrease the TCP window size on the machine initiating the transfer.
group. Add the group to the role.
D. Change the storage class of the bucket from Nearline to Multi-Regional.
C. Run gcloud iam roles describe roles/spanner.viewer - -project my-project. Add the
users to the role.
Correct Answer: B
D. Run gcloud iam roles describe roles/spanner.viewer - -project my-project. Add the Section: (none)
Explanation 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
Explanation/Reference: 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
QUESTION 42 group sizes when autoscaling. What should you do?
You’ve deployed a microservice called myapp1 to a Google Kubernetes Engine cluster using the YAML file
specified below: 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
Section: (none)
Explanation
Explanation/Reference:
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 Compute Engine. Use preemptible VM instances of the appropriate standard machine type.
D. Select Compute Engine. Use VM instance types that support micro bursting.
Correct Answer: C
Section: (none)
Explanation
Explanation/Reference:
You need to refactor this configuration so that the database password is not stored in plain text. You want to
f ollow Google-recommended practices. What should you do? QUESTION 45
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. 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 A. Run gcloud app restore.
DB_PASSWORD environment variable from the Secret.
B. On the App Engine page of the GCP Console, select the application that needs to be reverted and click
C. Store the database password inside a ConfigMap object. Modify the YAML file to populate the
Revert.
DB_PASSWORD environment variable from the ConfigMap.
C. On the App Engine Versions page of the GCP Console, route 100% of the traffic to the previous version.
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. 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.
Correct Answer: B
Section: (none) Correct Answer: B
Explanation Section: (none)
Explanation
Explanation/Reference:
Explanation/Reference:
Ref erence: https://medium.com/google-cloud/app-engine-project-cleanup-9647296e796a
QUESTION 43
You are running an application on multiple virtual machines within a managed instance group and have QUESTION 46
autoscaling enabled. The autoscaling policy is configured so that additional instances are added to the group 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? of memory. You want to upgrade the virtual machine to have 8 GB of memory. What should you do?
A. Check the app.yaml file for your application and check project settings. A. Rely on live migration to move the workload to a machine with more memory.
B. Check the web-application.xml f ile for your application and check project settings. B. Use gcloud to add metadata to the VM. Set the key to required-memory-size and the value to 8 GB.
C. Go to Deployment Manager and review settings for deployment of applications. C. Stop the VM, change the machine type to n1-standard-8, and start the VM.
D. Go to Cloud Shell and run gcloud config list to review the Google Cloud configuration used for D. Stop the VM, increase the memory to 8 GB, and start the VM.
deployment.
Correct Answer: D
Correct Answer: D Section: (none)
Section: (none) Explanation
Explanation
Explanation/Reference:
Explanation/Reference:
Ref erence: https://cloud.google.com/endpoints/docs/openapi/troubleshoot-aeflex-deployment
QUESTION 50
QUESTION 47 You have production and test workloads that you want to deploy on Compute Engine. Production VMs need
You want to configure 10 Compute Engine instances for availability when maintenance occurs. Your to be in a different subnet than the test VMs. All the VMs must be able to reach each other over internal IP
requirements state that these instances should attempt to automatically restart if they crash. Also, the without creating additional routes. You need to set up VPC and the 2 subnets. Which configuration meets
instances should be highly available including during system maintenance. What should you do? these requirements?
A. Create an instance template for the instances. Set the ‘Automatic Restart’ to on. Set the ‘On-host A. Create a single custom VPC with 2 subnets. Create each subnet in a different region and with a different
maintenance’ to Migrate VM instance. Add the instance template to an instance group. CIDR range.
B. Create an instance template for the instances. Set ‘Automatic Restart’ to off. Set ‘On-host maintenance’ B. Create a single custom VPC with 2 subnets. Create each subnet in the same region and with the same
to Terminate VM instances. Add the instance template to an instance group. CIDR range.
C. Create an instance group for the instances. Set the ‘Autohealing’ health check to healthy (HTTP). C. Create 2 custom VPCs, each with a single subnet. Create each subnet is a different region and with a
D. Create an instance group for the instance. Verify that the ‘Advanced creation options’ setting for ‘do not dif ferent CIDR range.
retry machine creation’ is set to off. 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: A
Section: (none) Correct Answer: A
Explanation Section: (none)
Explanation
Explanation/Reference:
Explanation/Reference:
QUESTION 48
You host a static website on Cloud Storage. Recently, you began to include links to PDF files on this site. QUESTION 51
Currently, when users click on the links to these PDF files, their browsers prompt them to save the file onto You need to create an autoscaling managed instance group for an HTTPS web application. You want to
their local system. Instead, you want the clicked PDF files to be displayed within the browser window directly, make sure that unhealthy VMs are recreated. What should you do?
without prompting the user to save the file locally. What should you do?
A. Create a health check on port 443 and use that when creating the Managed Instance Group.
A. Enable Cloud CDN on the website frontend. B. Select Multi-Zone instead of Single-Zone when creating the Managed Instance Group.
B. Enable ‘Share publicly’ on the PDF file objects. C. In the Instance Template, add the label ‘health-check’.
C. Set Content-Type metadata to application/pdf on the PDF file objects. D. In the Instance Template, add a startup script that sends a heartbeat to the metadata server.
D. Add a label to the storage bucket with a key of Content-Type and value of application/pdf.
Correct Answer: A
Correct Answer: C Section: (none)
Section: (none) Explanation
Explanation
Explanation/Reference:
Explanation/Reference: Ref erence: https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances
QUESTION 49 QUESTION 52
You have a virtual machine that is currently configured with 2 vCPUs and 4 GB of memory. It is running out Your company has a Google Cloud Platform project that uses BigQuery for data warehousing. Your data
science team changes frequently and has few members. You need to allow members of this team to perform
queries. You want to follow Google-recommended practices. What should you do? What should you do?
A. 1. Create an IAM entry f or each data scientist's user account. A. 1. Create an ingress firewall rule with the following settings: ג€¢ Targets: all instances ג€¢ Source filter: IP
2. Assign the BigQuery jobUser role to the group. ranges (with the range set to 10.0.2.0/24) ג€¢ Protocols: allow all 2. Create an ingress firewall rule with the
f ollowing settings: ג€¢ Targets: all instances ג€¢ Source filter: IP ranges (with the range set to 10.0.1.0/24) ג€¢
B. 1. Create an IAM entry f or each data scientist's user account. Protocols: allow all
2. Assign the BigQuery dataViewer user role to the group. B. 1. Create an ingress firewall rule with the following settings: ג€¢ Targets: all instances with tier #2 service
C. 1. Create a dedicated Google group in Cloud Identity. account ג€¢ Source filter: all instances with tier #1 service account ג€¢ Protocols: allow TCP:8080 2. Create an
2. Add each data scientist's user account to the group. ingress firewall rule with the following settings: ג€¢ Targets: all instances with tier #3 service account ג€¢
3. Assign the BigQuery jobUser role to the group. Source f ilter: all instances with tier #2 service account ג€¢ Protocols: allow TCP: 8080
D. 1. Create a dedicated Google group in Cloud Identity. C. 1. Create an ingress firewall rule with the following settings: ג€¢ Targets: all instances with tier #2 service
2. Add each data scientist's user account to the group. account ג€¢ Source filter: all instances with tier #1 service account ג€¢ Protocols: allow all 2. Create an ingress
3. Assign the BigQuery dataViewer user role to the group. f irewall rule with the f ollowing settings: ג€¢ Targets: all instances with tier #3 service account ג€¢ Source filter:
all instances with tier #2 service account ג€¢ Protocols: allow all
Correct Answer: C D. 1. Create an egress firewall rule with the following settings: ג€¢ Targets: all instances ג€¢ Source filter: IP
Section: (none) ranges (with the range set to 10.0.2.0/24) ג€¢ Protocols: allow TCP: 8080 2. Create an egress firewall rule with
Explanation the f ollowing settings: ג€¢ Targets: all instances ג€¢ Source filter: IP ranges (with the range set to 10.0.1.0/24)
ג€¢ Protocols: allow TCP: 8080
Explanation/Reference:
Ref erence: https://cloud.google.com/bigquery/docs/cloud-sql-federated-queries Correct Answer: B
Section: (none)
QUESTION 53 Explanation
Your company has a 3-tier solution running on Compute Engine. The configuration of the current
inf rastructure is shown below. Explanation/Reference:
QUESTION 54
You are given a project with a single virtual private cloud (VPC) and a single subnetwork in the us-central1
region. There is a Compute Engine instance hosting an application in this subnetwork. You need to deploy a
new instance in the same project in the europe-west1 region. This new instance needs access to the
application. You want to follow Google-recommended practices. What should you do?
Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
Each tier has a service account that is associated with all instances within it. You need to enable
communication on TCP port 8080 between tiers as follows:
A. 1. Go to the Logs ingestion window in Stackdriver Logging, and disable the log source for the GKE
container resource. QUESTION 58
B. 1. Go to the Logs ingestion window in Stackdriver Logging, and disable the log source for the GKE You are building an application that stores relational data from users. Users across the globe will use this
Cluster Operations resource. application. Your CTO is concerned about the scaling requirements because the size of the user base is
unknown. You need to implement a database solution that can scale with your user growth with minimum
C. 1. Go to the GKE console, and delete existing clusters.
conf iguration changes. Which storage solution should you use?
2. Recreate a new cluster.
3. Clear the option to enable legacy Stackdriver Logging.
A. Cloud SQL
D. 1. Go to the GKE console, and delete existing clusters.
2. Recreate a new cluster. B. Cloud Spanner
3. Clear the option to enable legacy Stackdriver Monitoring. C. Cloud Firestore
D. Cloud Datastore
Correct Answer: A
Section: (none) Correct Answer: B
Explanation Section: (none)
Explanation
Explanation/Reference:
Explanation/Reference:
QUESTION 56
You have a website hosted on App Engine standard environment. You want 1% of your users to see a new QUESTION 59
test version of the website. You want to minimize complexity. What should you do? You are the organization and billing administrator for your company. The engineering team has the Project
Creator role on the organization. You do not want the engineering team to be able to link projects to the
A. Deploy the new version in the same application and use the --migrate option. billing account. Only the finance team should be able to link a project to a billing account, but they should not
B. Deploy the new version in the same application and use the --splits option to give a weight of 99 to be able to make any other changes to projects. What should you do?
the current version and a weight of 1 to the new version.
C. Create a new App Engine application in the same project. Deploy the new version in that application. Use A. Assign the finance team only the Billing Account User role on the billing account. Most Voted
the App Engine library to proxy 1% of the requests to the new version. B. Assign the engineering team only the Billing Account User role on the billing account.
D. Create a new App Engine application in the same project. Deploy the new version in that application. C. Assign the finance team the Billing Account User role on the billing account and the Project Billing
Conf igure your network load balancer to send 1% of the traffic to that new application. Manager role on the organization. Most Voted
D. Assign the engineering team the Billing Account User role on the billing account and the Project Billing
Correct Answer: B Manager role on the organization.
Section: (none)
Explanation Correct Answer: A
Section: (none)
Explanation/Reference: Explanation
QUESTION 57 Explanation/Reference:
You have a web application deployed as a managed instance group. You have a new version of the
application to gradually deploy. Your web application is currently receiving live web traffic. You want to
ensure that the available capacity does not decrease during the deployment. What should you do? QUESTION 60
You have an application running in Google Kubernetes Engine (GKE) with cluster autoscaling enabled. The
A. Perf orm a rolling-action start-update with maxSurge set to 0 and maxUnavailable set to 1. application exposes a TCP endpoint. There are several replicas of this application. You have a Compute
B. Perf orm a rolling-action start-update with maxSurge set to 1 and maxUnavailable set to 0. Engine instance in the same region, but in another Virtual Private Cloud (VPC), called gce-network, that
has no overlapping IP ranges with the first VPC. This instance needs to connect to the application on GKE.
C. Create a new managed instance group with an updated instance template. Add the group to the backend You want to minimize effort. What should you do?
service for the load balancer. When all instances in the new managed instance group are healthy, delete
the old managed instance group.
A. 1. In GKE, create a Service of type LoadBalancer that uses the application's Pods as backend. 2. Set the
D. Create a new instance template with the new application version. Update the existing managed instance service's externalTrafficPolicy to Cluster. 3. Configure the Compute Engine instance to use the address of
group with the new instance template. Delete the instances in the managed instance group to allow the the load balancer that has been created.
managed instance group to recreate the instance using the new instance template. B. 1. In GKE, create a Service of type NodePort that uses the application's Pods as backend. 2. Create a
Compute Engine instance called proxy with 2 network interfaces, one in each VPC. 3. Use iptables on this
Correct Answer: B instance to forward traffic from gce-network to the GKE nodes. 4. Configure the Compute Engine instance to
use the address of proxy in gce-network as endpoint.
C. 1. In GKE, create a Service of type LoadBalancer that uses the application's Pods as backend. 2. Add an
annotation to this service: cloud.google.com/load-balancer-type: Internal 3. Peer the two VPCs together.
Question 61
4. Conf igure the Compute Engine instance to use the address of the load balancer that has been Your organization is a financial company that needs to store audit log files for 3 years. Your
created. Most Voted organization has hundreds of Google Cloud projects. You need to implement a cost-effective
D. 1. In GKE, create a Service of type LoadBalancer that uses the application's Pods as backend. 2. Add a approach for log file retention. What should you do?
Cloud Armor Security Policy to the load balancer that whitelists the internal IPs of the MIG's instances. 3.
Conf igure the Compute Engine instance to use the address of the load balancer that has been created.
• A. Create an export to the sink that saves logs from Cloud Audit to BigQuery.
Correct Answer: C • B. Create an export to the sink that saves logs from Cloud Audit to Coldline Storage
Section: (none)
Explanation bucket. Most Voted
• C. Write a custom script that uses logging API to copy the logs from Stackdriver logs to
Explanation/Reference: BigQuery.
• D. Export these logs to Cloud Pub/Sub and write a Cloud Dataflow pipeline to store logs to
Cloud SQL.
QUESTION 61
Your organization is a f inancial company that needs to store audit log files for 3 years. Your organization has
hundreds of Google Cloud projects. You need to implement a cost-effective approach for log file retention. Correct Answer: B
What should you do? Reference:
https://cloud.goog le.com/logging/docs/audit/
A. Create an export to the sink that saves logs from Cloud Audit to BigQuery.
B. Create an export to the sink that saves logs from Cloud Audit to a Coldline Storage bucket.
Question 62
C. Write a custom script that uses logging API to copy the logs from Stackdriver logs to BigQuery.
You want to run a single caching HTTP reverse proxy on GCP for a latency-sensitive website. This
D. Export these logs to Cloud Pub/Sub and write a Cloud Dataflow pipeline to store logs to Cloud SQL.
specific reverse proxy consumes almost no CPU. You want to have a 30-GB in-memory cache, and
Correct Answer: B need an additional 2 GB of memory for the rest of the processes. You want to minimize cost. How
Section: (none) should you run this reverse proxy?
Explanation
Explanation/Reference: • A. Create a Cloud Memorystore for Redis instance with 32-GB capacity. Most Voted
Ref erence: https://cloud.google.com/logging/docs/audit/ • B. Run it on Compute Engine, and choose a custom instance type with 6 vCPUs and 32 GB
of memory.
• C. Package it in a container image, and run it on Kubernetes Engine, using n1-standard-32
instances as nodes.
• D. Run it on Compute Engine, choose the instance type n1-standard-1, and add an SSD
persistent disk of 32 GB.
Correct Answer: A
Question 63
You are hosting an application on bare-metal servers in your own data center. The application
needs access to Cloud Storage. However, security policies prevent the servers hosting the
application from having public IP addresses or access to the internet. You want to follow Google-
recommended practices to provide the application with access to Cloud Storage. What should you
do?
• A. 1. Use nslookup to get the IP address for storage.googleapis.com. 2. Negotiate with the • A. Deploy the container on Cloud Run. Most Voted
security team to be able to give a public IP address to the servers. 3. Only allow egress • B. Deploy the container on Cloud Run on GKE.
traffic from those servers to the IP addresses for storage.googleapis.com. • C. Deploy the container on App Engine Flexible.
• B. 1. Using Cloud VPN, create a VPN tunnel to a Virtual Private Cloud (VPC) in Google • D. Deploy the container on GKE with cluster autoscaling and horizontal pod autoscaling enabled.
Cloud. 2. In this VPC, create a Compute Engine instance and install the Squid proxy server
on this instance. 3. Configure your servers to use that instance as a proxy to access Cloud
Storage. Correct Answer: A
• C. 1. Use Migrate for Compute Engine (formerly known as Velostrata) to migrate those
servers to Compute Engine. 2. Create an internal load balancer (ILB) that uses Question 66
storage.googleapis.com as backend. 3. Configure your new instances to use this ILB as Your company has an existing GCP organization with hundreds of projects and a billing account.
proxy. Your company recently acquired another company that also has hundreds of projects and its own
• D. 1. Using Cloud VPN or Interconnect, create a tunnel to a VPC in Google Cloud. 2. billing account. You would like to consolidate all GCP costs of both GCP organizations onto a
Use. 2.Cloud Router to create a custom route advertisement for 199.36.153.4/30. single invoice. You would like to consolidate all costs as of tomorrow. What should you do?
Announce that network to your on-premises network through the VPN tunnel. 3. In your
on-premises network, configure your DNS server to resolve *.googleapis.com as a
CNAME to restricted.googleapis.com. Most Voted
• A. Link the acquired company's projects to your company's billing account.
• B. Configure the acquired company's billing account and your company's billing account to export
Correct Answer: D
the billing data into the same BigQuery dataset.
• C. Migrate the acquired company's projects into your company's GCP organization. Link the
Question 64 migrated projects to your company's billing account.
You want to deploy an application on Cloud Run that processes messages from a Cloud Pub/Sub • D. Create a new GCP organization and a new billing account. Migrate the acquired company's
topic. You want to follow Google-recommended practices. What should you do? projects and your company's projects into the new GCP organization and link the projects to the
new billing account.
• A. 1. Create a Cloud Function that uses a Cloud Pub/Sub trigger on that topic. 2. Call your
application on Cloud Run from the Cloud Function for every message. Correct Answer: A
• B. 1. Grant the Pub/Sub Subscri ber role to the service account used by Cloud Run. 2. Create Reference:
a Cloud Pub/Sub subscription for that topic. 3. Make your application pull messages from https://cloud.g oog le.com/resource -manag er/docs/migrati ng -projec ts-billi ng
that subscription.
• C. 1. Create a service account. 2. Give the Cloud Run Invoker role to that service account Question 67
for your Cloud Run application. 3. Create a Cloud Pub/Sub subscription that uses that You built an application on Google Cloud that uses Cloud Spanner. Your support team needs to
service account and uses your Cloud Run application as the push endpoint. monitor the environment but should not have access to table data.
• D. 1. Deploy your application on Cloud Run on GKE with the connectivity set to Internal. You need a streamlined solution to grant the correct permissi ons to your support team, and you
2. Create a Cloud Pub/Sub subscription for that topic. 3. In the same Google Kubernetes want to follow Google-recommended practices. What should you do?
Engine cluster as your application, deploy a container that takes the messages and
sends them to your application. • A. Add the support team group to the roles/monitoring.viewer role
• B. Add the support team group to the roles/spanner.databaseUser role.
• C. Add the support team group to the roles/spanner.databaseReader role.
Correct Answer: C • D. Add the support team group to the roles/stackdriver.accounts.viewer role.
Correct Answer: A
Question 65
You need to deploy an application, which is packaged in a container image, in a new project. The
application exposes an HTTP endpoint and receives very few requests per day. You want to minimize
costs. What should you do?
Question 68 Question 70
For analysis purposes, you need to send all the logs from all of your Compute Engine instances to You are building an applicati on that will run in your data center. The application will use Google
a BigQuery dataset called platform-logs. You have already installed the Cloud Logging agent on all Cloud Platform (GCP) services like AutoML. You created a service account that has appropriate
the instances. You want to minimize cost. What should you do? access to AutoML. You need to enable authentication to the APIs from your on-premises
environment. What should you do?
• A. 1. Give the BigQuery Data Editor role on the platform-logs dataset to the service accounts used
by your instances. 2. Update your instances' metadata to add the following value: logs- • A. Use service account credentials in your on-premises application.
destination: bq://platform-logs. • B. Use gcloud to create a key file for the service account that has appropriate permissions.
• B. 1. In Cloud Logging, create a logs export with a Cloud Pub/Sub topic called logs as a sink. 2. • C. Set up direct interconnect between your data center and Google Cloud Platform to enable
Create a Cloud Function that is triggered by messages in the logs topic. 3. Configure that Cloud authentication for your on-premises applications.
Function to drop logs that are not from Compute Engine and to insert Compute Engine logs in the • D. Go to the IAM & admin console, grant a user account permissions similar to the service
platform-logs dataset. account permissions, and use this user account for authentication from your data center.
• C. 1. In Cloud Logging, create a filter to view only Compute Engine logs. 2. Click Create Export. 3.
Choose BigQuery as Sink Service, and the platform-logs dataset as Sink Destination.
• D. 1. Create a Cloud Function that has the BigQuery User role on the platform-logs dataset. 2. Correct Answer: B
Configure this Cloud Function to create a BigQuery Job that executes this query: INSERT INTO Reference:
dataset.platform-logs (timestamp, log) SELECT timestamp, log FROM compute.logs WHERE https://cloud.goog le.com/vi sion/automl/docs/before -you-begin
timestamp > DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY) 3. Use Cloud Scheduler to trigger
this Cloud Function once a day. Question 71
You are using Container Registry to centrally store your company's container images in a separate
project. In another project, you want to create a Google
Correct Answer: C Kubernetes Engine (GKE) cluster. You want to ensure that Kubernetes can download images from
Container Registry. What should you do?
Question 69
• A. In the project where the images are stored, grant the Storage Object Viewer IAM role to the
You are using Deployment Manager to create a Google Kubernetes Engine cluster. Using the same
service account used by the Kubernetes nodes.
Deployment Manager deployment, you also want to create a
• B. When you create the GKE cluster, choose the Allow full access to all Cloud APIs option under
DaemonSet in the kube-system namespace of the cluster. You want a solution that uses the fewest
'Access scopes'.
possible services. What should you do?
• C. Create a service account, and give it access to Cloud Storage. Create a P12 key for this service
account and use it as an imagePullSecrets in Kubernetes.
• A. Add the cluster's API as a new Type Provider in Deployment Manager, and use the new type to
• D. Configure the ACLs on each image in Cloud Storage to give read-only access to the default
create the DaemonSet.
Compute Engine service account.
• B. Use the Deployment Manager Runtime Configurator to create a new Config resource that
contains the DaemonSet definition.
• C. With Deployment Manager, create a Compute Engine instance with a startup script that uses
Correct Answer: A
kubectl to create the DaemonSet.
• D. In the cluster's definition in Deployment Manager, add a metadata that has kube-system as key
Question 72
and the DaemonSet manifest as value.
You deployed a new application inside your Google Kubernetes Engine cluster using the YAML file
specified below.
Correct Answer: A
Reference:
https://cloud.google.com/kubernetes-engine/docs/how-to/cluster-access-for-kubectl
Question 73
You are setting up a Windows VM on Compute Engine and want to make sure you can log in to the
VM via RDP. What should you do?
• A. After the VM has been created, use your Google Account credentials to log in into the VM.
• B. After the VM has been created, use gcloud compute reset-windows-password to retrieve the
login credentials for the VM.
• C. When creating the VM, add metadata to the instance using 'windows-password' as the key and
a password as the value.
• D. After the VM has been created, download the JSON private key for the default Compute Engine
service account. Use the credentials in the JSON file to log in to the VM.
Correct Answer: B
Question 74
You want to configure an SSH connection to a single Compute Engine instance for users in the
dev1 group. This instance is the only resource in this particular
Google Cloud Platform project that the dev1 users should be able to connec t to. What should you
do?
• A. Set metadata to enable-oslogin=true for the instance. Grant the dev1 group the
You check the status of the deployed pods and notice that one of them is still in PENDING status: compute.osLogin role. Direct them to use the Cloud Shell to ssh to that instance.
• B. Set metadata to enable-oslogin=true for the instance. Set the service account to no service
account for that instance. Direct them to use the Cloud Shell to ssh to that instance.
• C. Enable block project wide keys for the instance. Generate an SSH key for each user in the dev1
group. Distribute the keys to dev1 users and direct them to use their third-party tools to connect.
• D. Enable block project wide keys for the instance. Generate an SSH key and associate the key
with that instance. Distribute the key to dev1 users and direct them to use their third-party tools
You want to find out why the pod is stuck in pending status. What should you do?
to connect.
• A. Review details of the myapp-service Service object and check for error messages. Correct Answer: A
• B. Review details of the myapp-deployment Deployment object and check for error messages. Reference:
• C. Review details of myapp-deployment-58ddbbb995-lp86m Pod and check for warning https://cloud.g oog le.com/com pute/docs/ins tances/addi ng -removi ng -ssh-k eys
messages.
• D. View logs of the container in myapp-deployment-58ddbbb995-lp86m pod and check for Question 75
warning messages. You need to produce a list of the enabled Google Cloud Platform APIs for a GCP project using the
gcloud command line in the Cloud Shell. The project name is my-project. What should you do?
Correct Answer: C
Reference: • A. Run gcloud projects list to get the project ID, and then run gcloud services list --project <project
https://cloud.goog le.com/run/docs/gk e/troubleshooti ng ID>.
• B. Run gcloud init to set the current project to my-project, and then run gcloud services list --
available.
• C. Run gcloud info to view the account value, and then run gcloud services list --account
<Account>.
• D. Run gcloud projects describe <project ID> to verify the project value, and then run gcloud Question 78
services list --available. You are using Google Kubernetes Engine with autoscaling enabled to host a new application. You
want to expose this new application to the public, using HTTPS on a public IP address. What
should you do?
Correct Answer: A
• A. Create a Kubernetes Service of type NodePort for your application, and a Kubernetes Ingress to
Question 76 expose this Service via a Cloud Load Balancer.
You are building a new version of an application hosted in an App Engine environment. You want to • B. Create a Kubernetes Service of type ClusterIP for your application. Configure the public DNS
test the new version with 1% of users before you completely switch your application over to the name of your application using the IP of this Service.
new version. What should you do? • C. Create a Kubernetes Service of type NodePort to expose the application on port 443 of each
node of the Kubernetes cluster. Configure the public DNS name of your application with the IP of
• A. Deploy a new version of your application in Google Kubernetes Engine instead of App Engine every node of the cluster to achieve load-balancing.
and then use GCP Console to split traffic. • D. Create a HAProxy pod in the cluster to load-balance the traffic to all the pods of the
• B. Deploy a new version of your application in a Compute Engine instance instead of App Engine application. Forward the public traffic to HAProxy with an iptable rule. Configure the DNS name of
and then use GCP Console to split traffic. your application using the public IP of the node HAProxy is running on.
• C. Deploy a new version as a separate app in App Engine. Then configure App Engine using GCP
Console to split traffic between the two apps. Correct Answer: A
• D. Deploy a new version of your application in App Engine. Then go to App Engine settings in GCP Reference:
Console and split traffic between the current version and newly deployed versions accordingly. https://cloud.goog le.com/k ubernetes-engine/docs/tutorials/http-balancer
Question 79
Correct Answer: D You need to enable traffic between multiple groups of Compute Engine instances that are currently
running two different GCP projects. Each group of Compute
Question 77 Engine instances is running in its own VPC. What should you do?
You need to provide a cost estimate for a Kubernetes cluster using the GCP pricing calculator for
Kubernetes. Your workload requires high IOPs, and you will also be using disk snapshots. You start • A. Verify that both projects are in a GCP Organization. Create a new VPC and add all instances.
by entering the number of nodes, average hours, and average days. What should you do next? • B. Verify that both projects are in a GCP Organization. Share the VPC from one project and
request that the Compute Engine instances in the other project use this shared VPC.
• A. Fill in local SSD. Fill in persistent disk storage and snapshot storage. • C. Verify that you are the Project Administrator of both projects. Create two new VPCs and add all
• B. Fill in local SSD. Add estimated cost for cluster management. instances.
• C. Select Add GPUs. Fill in persistent disk storage and snapshot storage. • D. Verify that you are the Project Administrator of both projects. Create a new VPC and add all
• D. Select Add GPUs. Add estimated cost for cluster management. instances.
You want to add a new auditor to a Google Cloud Platform project. The auditor should be allowed
to read, but not modify, all project items.
How should you configure the auditor's permissions?
• A. Create a custom role with view-only project permissions. Add the user's account to the custom
role.
• B. Create a custom role with view-only service permissions. Add the user's account to the custom
role.
• C. Select the built-in IAM project Viewer role. Add the user's account to this role. • D. In the G Suite console, add the users to a special group called cloud-console-
• D. Select the built-in IAM service Viewer role. Add the user's account to this role. [email protected]. Rely on the default behavior of the Cloud Platform to grant users access
if they are members of this group.
Correct Answer: C
Reference: Correct Answer: B
https://cloud.g oog le.com/resource -manag er/docs/access-control-proj Reference:
https://cloud.g oog le.com/resource -manag er/docs/creating -managing -org anization
Question 81
You are operati ng a Google Kubernetes Engine (GKE) cluster for your company where different Question 84
teams can run non-production workloads. Your Machine Learning You have a Google Cloud Platform account with access to both production and development
(ML) team needs access to Nvidia Tesla P100 GPUs to train their models. You want to minimize projects. You need to create an automated proces s to list all compute instances in develop ment
effort and cost. What should you do? and production projects on a daily basis. What should you do?
• A. Ask your ML team to add the ג€accelerator: gpuג€ annotation to their pod specification. • A. Create two configurations using gcloud config. Write a script that sets configurations as
• B. Recreate all the nodes of the GKE cluster to enable GPUs on all of them. active, individually. For each configuration, use gcloud compute instances list to get a list of
• C. Create your own Kubernetes cluster on top of Compute Engine with nodes that have GPUs. compute resources.
Dedicate this cluster to your ML team. • B. Create two configurations using gsutil config. Write a script that sets configurations as active,
• D. Add a new, GPU-enabled, node pool to the GKE cluster. Ask your ML team to add the individually. For each configuration, use gsutil compute instances list to get a list of compute
cloud.google.com/gke -accelerator: nvidia-tesla-p100 nodeSelector to their pod specification. resources.
• C. Go to Cloud Shell and export this information to Cloud Storage on a daily basis.
Correct Answer: D • D. Go to GCP Console and export this information to Cloud SQL on a daily basis.
Correct Answer: B
Question 88
You need to set a budget alert for use of Compute Engineer services on one of the three Google Questi on 91
Cloud Platform projects that you manag e. All three projects are linked to a single billing account.
Your company's infrastructure is on-premises, but all machines are running at maximum capacity.
What should you do? You want to burst to Google Cloud. The workloads on Google
Cloud must be able to directly communicate to the workloads on-premises using a private IP
• A. Verify that you are the project billing administrator. Select the associated billing account and
range. What should you do?
create a budget and alert for the appropriate project.
• B. Verify that you are the project billing administrator. Select the associated billing account and • A. In Google Cloud, configure the VPC as a host for Shared VPC.
create a budget and a custom alert. • B. In Google Cloud, configure the VPC for VPC Network Peering.
• C. Verify that you are the project administrator. Select the associated billing account and create a • C. Create bastion hosts both in your on-premises environment and on Google Cloud. Configure
budget for the appropriate project. both as proxy servers using their public IP addresses.
• D. Verify that you are project administrator. Select the associated billing account and create a • D. Set up Cloud VPN between the infrastructure on-premises and Google Cloud.
budget and a custom alert.
Correct Answer: D
Correct Answer: A
Question 92
Question 89
You want to select and configure a solution for storing and archiving data on Google Cloud
You are migrating a production-critical on-premises application that requires 96 vCPUs to perform
Platform. You need to support compliance objectives for data from one geographic location. This
its task. You want to make sure the application runs in a similar environment on GCP. What should
data is archived after 30 days and needs to be accessed annually. What should you do?
you do?
• A. Select Multi-Regional Storage. Add a bucket lifecycle rule that archives data after 30 days to
Coldline Storage.
• A. When creating the VM, use machine type n1-standard-96.
• B. Select Multi-Regional Storage. Add a bucket lifecycle rule that archives data after 30 days to Correct Answer: B
Nearline Storage.
• C. Select Regional Storage. Add a bucket lifecycle rule that archives data after 30 days to
Question 95
Nearline Storage.
• D. Select Regional Storage. Add a bucket lifecycle rule that archives data after 30 days to Coldline You want to find out when users were added to Cloud Spanner Identity Access Management (IAM)
roles on your Google Cloud Platform (GCP) project. What should you do in the GCP Console?
Storage.
• A. Open the Cloud Spanner console to review configurations.
Correct Answer: D
• B. Open the IAM & admin console to review IAM policies for Cloud Spanner roles.
• C. Go to the Stackdriver Monitoring console and review information for Cloud Spanner.
Question 93 • D. Go to the Stackdriver Logging console, review admin activity logs, and filter them for Cloud
Your company uses BigQuery for data warehousing. Over time, many different business units in Spanner IAM roles.
your company have created 1000+ datasets across hundreds of projects. Your CIO wants you to
examine all datasets to find tables that contain an employee_ssn column. You want to minimize Correct Answer: D
effort in performing this task.
What should you do? Questi on 96
Your company implemented BigQuery as an enterprise data warehouse. Users from multiple
• A. Go to Data Catalog and search for employee_ssn in the search box. business units run queries on this data warehouse. However, you notice that query costs for
• B. Write a shell script that uses the bq command line tool to loop through all the projects in your BigQuery are very high, and you need to control costs. Which two methods should you use?
organization. (Choose two.)
• C. Write a script that loops through all the projects in your organization and runs a query on
INFORMATION_SCHEMA.COLUMNS view to find the employee_ssn column. • A. Split the users from business units to multiple projects.
• D. Write a Cloud Dataflow job that loops through all the projects in your organization and runs a • B. Apply a user- or project-level custom query quota for BigQuery data warehouse.
query on INFORMATION_SCHEMA.COLUMNS view to find employee_ssn column. • C. Create separate copies of your BigQuery data warehouse for each business unit.
• D. Split your BigQuery data warehouse into multiple data warehouses for each business unit.
Correct Answer: A • E. Change your BigQuery query model from on-demand to flat rate. Apply the appropriate number
of slots to each Project.
Question 94 Correct Answer: B E
You create a Deployment with 2 replicas in a Google Kubernetes Engine cluster that has a single
preemptible node pool. After a few minutes, you use kubectl to examine the status of your Pod and
observe that one of them is still in Pending status: Question 97
You are building a product on top of Google Kubernetes Engine (GKE). You have a single GKE
cluster. For each of your customers, a Pod is running in that cluster, and your customers can run
arbitrary code inside their Pod. You want to maximize the isolation between your customers' Pods.
What should you do?
What is the most likely cause? • A. Use Binary Authorization and whitelist only the container images used by your customers'
Pods.
• A. The pending Pod's resource requests are too large to fit on a single node of the cluster. • B. Use the Container Analysis API to detect vulnerabilities in the containers used by your
• B. Too many Pods are already running in the cluster, and there are not enough resources left to customers' Pods.
schedule the pending Pod. • C. Create a GKE node pool with a sandbox type configured to gvisor. Add the parameter
• C. The node pool is configured with a service account that does not have permission to pull the runtimeClassName: gvisor to the specification of your customers' Pods.
container image used by the pending Pod. • D. Use the cos_containerd image for your GKE nodes. Add a nodeSelector with the value
• D. The pending Pod was originally scheduled on a node that has been preempted between the cloud.google.com/gke-os-distribution: cos_containerd to the specification of your customers'
creation of the Deployment and your verification of the Pods' status. It is currently being Pods.
rescheduled on a new node.
Correct Answer: C
Reference: Question 100
https://cloud.goog le.com/k ubernetes-engine/sandbox/ Your organization has strict requirements to control access to Google Cloud projects. You need to
enable your Site Reliability Engineers (SREs) to approve requests from the Google Cloud support
Question 98 team when an SRE opens a support case. You want to follow Google-recommended practices.
Your customer has implemented a solution that uses Cloud Spanner and notices some read What should you do?
latency-related performance issues on one table. This table is accessed only by their users using a
primary key. The table schema is shown below. • A. Add your SREs to roles/iam.roleAdmin role.
• B. Add your SREs to roles/accessapproval.approver role.
• C. Add your SREs to a group and then add this group to roles/iam.roleAdmin.role.
• D. Add your SREs to a group and then add this group to roles/accessapproval.approver role.
Correct Answer: D
Question 101
You need to host an application on a Compute Engine instance in a project shared with other
teams. You want to prevent the other teams from accidentally causing downtime on that
You want to resolve the issue. What should you do? application. Which feature should you use?
• A. Remove the profile_picture field from the table.
• A. Use a Shielded VM.
• B. Add a secondary index on the person_id column.
• B. Use a Preemptible VM.
• C. Change the primary key to not have monotonically increasing values. Most Voted
• C. Use a sole-tenant node.
• D. Create a secondary index using the following Data Definition Language
• D. Enable deletion protection on the instance.
Correct Answer D
Question 102
Your organization needs to grant users access to query datasets in BigQuery but prevent them
from accidentally deleting the datasets. You want a solution that follows Google-recomm ended
practices. What should you do?
(DDL):
• A. Add users to roles/bigquery user role only, instead of roles/bigquery dataOwner. Most Voted
Correct Answer: C • B. Add users to roles/bigquery dataEditor role only, instead of roles/bigquery dataOwner.
• C. Create a custom role by removing delete permissions, and add users to that role only.
• D. Create a custom role by removing delete permissions. Add users to the group, and then add
Question 99
the group to the custom role. Most Voted
Your finance team wants to view the billing report for your projects. You want to make sure that the
finance team does not get additional permissions to the project. What should you do? Correct Answer: D
• A. Add the group for the finance team to roles/billing user role.
• B. Add the group for the finance team to roles/billing admin role. Question 103
• C. Add the group for the finance team to roles/billing viewer role. You have a developer laptop with the Cloud SDK installed on Ubuntu. The Cloud SDK was installed
• D. Add the group for the finance team to roles/billing project/Manager role. from the Google Cloud Ubuntu package repository. You want to test your application locally on
your laptop with Cloud Datastore. What should you do?
Correct Answer: C
• A. Export Cloud Datastore data using gcloud datastore export.
• B. Create a Cloud Datastore index using gcloud datastore indexes create.
• C. Install the google-cloud-sdk-datastore-emulator component using the apt get install
command. Most Voted
Question 107
• D. Install the cloud-datastore-emulator component using the gcloud components install
command. Most Voted You are building an archival solution for your data warehouse and have selected Cloud Storage to
archive your data. Your users need to be able to access this archived data once a quarter for some
regulatory requirements. You want to select a cost-efficient option. Which storage option should
Correct Answer: D
you use?
Correct Answer: D • A. Use Google Cloud Directory Sync (GCDS) to synchronize users into Cloud Identity.
• B. Use the cloud Identity APIs and write a script to synchronize users to Cloud Identity. Question 112
• C. Export users from Active Directory as a CSV and import them to Cloud Identity via the Admin You have a workload running on Compute Engine that is critical to your business. You want to
Console. ensure that the data on the boot disk of this workload is backed up regularly. You need to be able
• D. Ask each employee to create a Google account using self signup. Require that each employee to restore a backup as quickly as possible in case of disaster. You also want older backups to be
use their company email address and password. cleaned automatically to save on cost. You want to follow Google-recommended practices. What
should you do?
Correct Answer: A
Reference: • A. Create a Cloud Function to create an instance template.
https://cloud.goog le.com/solutions/federati ng -g cp-with-acti ve-di rectory-introduc tion • B. Create a snapshot schedule for the disk using the desired interval.
• C. Create a cron job to create a new disk from the disk using gcloud.
• D. Create a Cloud Task to create an image and export it to Cloud Storage.
Question 110
You have successfully created a development environment in a project for an application. This
Correct Answer: B
application uses Compute Engine and Cloud SQL. Now you need to create a production
environment for this application. The securi ty team has forbidden the existenc e of network routes
between these 2 environments and has asked you to follow Google-recommended practices. What Question 113
should you do? You need to assign a Cloud Identity and Access Management (Cloud IAM) role to an external
auditor. The auditor needs to have permissions to review your
• A. Create a new project, enable the Compute Engine and Cloud SQL APIs in that project, and Google Cloud Platform (GCP) Audit Logs and also to review your Data Access logs. What should
replicate the setup you have created in the development environment. Most Voted you do?
• B. Create a new production subnet in the existing VPC and a new production Cloud SQL instance
in your existing project, and deploy your application using those resources. • A. Assign the auditor the IAM role roles/logging.privateLogViewer. Perform the export of logs to
• C. Create a new project, modify your existing VPC to be a Shared VPC, share that VPC with your Cloud Storage.
new project, and replicate the setup you have in the development environment in that new project • B. Assign the auditor the IAM role roles/logging.privateLogViewer. Direct the auditor to also
in the Shared VPC. Most Voted review the logs for changes to Cloud IAM policy.
• D. Ask the security team to grant you the Project Editor role in an existing production project used • C. Assign the auditor's IAM user to a custom role that has logging.privateLogEntries.list
by another division of your company. Once they grant you that role, replicate the setup you have permission. Perform the export of logs to Cloud Storage.
in the development environment in that project. • D. Assign the auditor's IAM user to a custom role that has logging.privateLogEntries.list
permission. Direct the auditor to also review the logs for changes to Cloud IAM policy.
Correct Answer: C
Correct Answer: B
Question 111 Question 114
Your managem ent has asked an external auditor to review all the resources in a specifi c project. You are managing several Google Cloud Platform (GCP) projects and need access to all logs for
The security team has enabled the Organization Policy called the past 60 days. You want to be able to explore and quickly analyze the log contents. You want to
Domai n Restri cted Sharing on the organizati on node by specifyi ng only your Cloud Identity domain. follow Google-recommended practices to obtain the combined logs for all projects. What should
You want the auditor to only be able to view, but not modify, the resourc es in that project. What you do?
should you do?
• A. Navigate to Stackdriver Logging and select resource.labels.project_id="*"
• A. Ask the auditor for their Google account, and give them the Viewer role on the project. • B. Create a Stackdriver Logging Export with a Sink destination to a BigQuery dataset. Configure
• B. Ask the auditor for their Google account, and give them the Security Reviewer role on the the table expiration to 60 days.
project. • C. Create a Stackdriver Logging Export with a Sink destination to Cloud Storage. Create a lifecycle
• C. Create a temporary account for the auditor in Cloud Identity, and give that account the Viewer rule to delete objects after 60 days.
role on the project. • D. Configure a Cloud Scheduler job to read from Stackdriver and store the logs in BigQuery.
• D. Create a temporary account for the auditor in Cloud Identity, and give that account the Security Configure the table expiration to 60 days.
Reviewer role on the project.
Correct Answer: B
Correct Answer: C
Question 115 Questi on 118
You need to reduce GCP service costs for a division of your company using the fewest possible You need to create a custom IAM role for use with a GCP service. All permissions in the role must
steps. You need to turn off all configured services in an existing be suitable for production use. You also want to clearly share with your organization the status of
GCP project. What should you do? the custom role. This will be the first version of the custom role. What should you do?
• A. 1. Verify that you are assigned the Project Owners IAM role for this project. 2. Locate the • A. Use permissions in your role that use the 'supported' support level for role permissions. Set the
project in the GCP console, click Shut down and then enter the project ID. role stage to ALPHA while testing the role permissions.
• B. 1. Verify that you are assigned the Project Owners IAM role for this project. 2. Switch to the • B. Use permissions in your role that use the 'supported' support level for role permissions. Set the
project in the GCP console, locate the resources and delete them. role stage to BETA while testing the role permissions.
• C. 1. Verify that you are assigned the Organizational Administrator IAM role for this project. 2. • C. Use permissions in your role that use the 'testing' support level for role permissions. Set the
Locate the project in the GCP console, enter the project ID and then click Shut down. role stage to ALPHA while testing the role permissions.
• D. 1. Verify that you are assigned the Organizational Administrators IAM role for this project. 2. • D. Use permissions in your role that use the 'testing' support level for role permissions. Set the
Switch to the project in the GCP console, locate the resources and delete them. role stage to BETA while testing the role permissions
Questi on 116
You are configuring service accounts for an application that spans multiple projects. Virtual Question 119
machines (VMs) running in the web-applications project need access to BigQuery datasets in crm- Your company has a large quantity of unstructured data in different file formats. You want to
databases-proj. You want to follow Google-recommended practices to give access to the service perform ETL transformations on the data. You need to make the data accessible on Google Cloud
account in the web-applications project. What should you do? so it can be processed by a Dataflow job. What should you do?
• A. Give ג€project ownerג€ for web-applications appropriate roles to crm-databases-proj. • A. Upload the data to BigQuery using the bq command line tool.
• B. Give ג€project ownerג€ role to crm-databases-proj and the web-applications project. • B. Upload the data to Cloud Storage using the gsutil command line tool.
• C. Give ג€project ownerג€ role to crm-databases-proj and bigquery.dataViewer role to web- • C. Upload the data into Cloud SQL using the import function in the console.
applications. • D. Upload the data into Cloud Spanner using the import function in the console.
• D. Give bigquery.dataViewer role to crm-databases-proj and appropriate roles to web-
applications. Correct Answer: B
Correct Answer: C
Question 121 • A. 1. Create a consumer Gmail account. 2. Write a script that monitors the CPU usage. 3. When
Your managed instance group raised an alert stating that new instance creation has failed to the CPU usage exceeds the threshold, have that script send an email using the Gmail account and
create new instances. You need to maintain the number of running instances specified by the smtp.gmail.com on port 25 as SMTP server.
template to be able to process expected application traffic. What should you do? • B. 1. Create a Stackdriver Workspace, and associate your Google Cloud Platform (GCP) project
with it. 2. Create an Alerting Policy in Stackdriver that uses the threshold as a trigger condition. 3.
• A. Create an instance template that contains valid syntax which will be used by the instance Configure your email address in the notification channel.
group. Delete any persistent disks with the same name as instance names. Most Voted • C. 1. Create a Stackdriver Workspace, and associate your GCP project with it. 2. Write a script
• B. Create an instance template that contains valid syntax that will be used by the instance group. that monitors the CPU usage and sends it as a custom metric to Stackdriver. 3. Create an uptime
Verify that the instance name and persistent disk name values are not the same in the template. check for the instance in Stackdriver.
• C. Verify that the instance template being used by the instance group contains valid syntax. • D. 1. In Stackdriver Logging, create a logs-based metric to extract the CPU usage by using this
Delete any persistent disks with the same name as instance names. Set the disks.autoDelete regular expression: CPU Usage: ([0-9] {1,3})% 2. In Stackdriver Monitoring, create an Alerting
property to true in the instance template. Most Voted Policy based on this metric. 3. Configure your email address in the notification channel.
• D. Delete the current instance template and replace it with a new instance template. Verify that
the instance name and persistent disk name values are not the same in the template. Set the Correct Answer: B
disks.autoDelete property to true in the instance template.
Question 124
Correct Answer: A You have an application that uses Cloud Spanner as a backend database. The application has a
Reference: very predictable traffic pattern. You want to automati cally scale up or down the number of Spanner
https://cloud.g oog le.com/com pute/docs/ins tance -groups/creati ng -g roups-of-manag ed-i nstances nodes depending on traffic. What should you do?
Question 122 • A. Create a cron job that runs on a scheduled basis to review Cloud Monitoring metrics, and then
Your company is moving from an on-premises environment to Google Cloud. You have multiple resize the Spanner instance accordingly.
development teams that use Cassandra environments as backend databases. They all need a • B. Create a Cloud Monitoring alerting policy to send an alert to oncall SRE emails when Cloud
development environment that is isolated from other Cassandra instances. You want to move to Spanner CPU exceeds the threshold. SREs would scale resources up or down accordingly.
Google Cloud quickly and with minimal support effort. What should you do? • C. Create a Cloud Monitoring alerting policy to send an alert to Google Cloud Support email when
Cloud Spanner CPU exceeds your threshold. Google support would scale resources up or down
• A. 1. Build an instruction guide to install Cassandra on Google Cloud. 2. Make the instruction accordingly.
guide accessible to your developers. • D. Create a Cloud Monitoring alerting policy to send an alert to webhook when Cloud Spanner
• B. 1. Advise your developers to go to Cloud Marketplace. 2. Ask the developers to launch a CPU is over or under your threshold. Create a Cloud Function that listens to HTTP and resizes
Cassandra image for their development work. Spanner resources accordingly.
• C. 1. Build a Cassandra Compute Engine instance and take a snapshot of it. 2. Use the snapshot
to create instances for your developers. Correct Answer: D
• D. 1. Build a Cassandra Compute Engine instance and take a snapshot of it. 2. Upload the
snapshot to Cloud Storage and make it accessible to your developers. 3. Build instructions to Question 125
create a Compute Engine instance from the snapshot so that developers can do it themselves. Your company publishes large files on an Apache web server that runs on a Compute Engine instance.
The Apache web server is not the only application running in the project. You want to receive an email
Correct Answer: B when the egress network costs for the server exceed 100 dollars for the current month as measured by
Google Cloud.
What should you do?
Questi on 123
You have a Compute Engine instance hosting a production application. You want to receive an • A. Set up a budget alert on the project with an amount of 100 dollars, a threshold of 100%, and
email if the instance consumes more than 90% of its CPU resources for more than 15 minutes. You notification type of ג€email.ג€
want to use Google services. What should you do? • B. Set up a budget alert on the billing account with an amount of 100 dollars, a threshold of 100%,
and notification type of ג€email.ג€
• C. Export the billing data to BigQuery. Create a Cloud Function that uses BigQuery to sum the
egress network costs of the exported billing data for the Apache web server for the current month
and sends an email if it is over 100 dollars. Schedule the Cloud Function using Cloud Scheduler to minimizing costs.
run hourly. What should you do?
• D. Use the Cloud Logging Agent to export the Apache web server logs to Cloud Logging. Create a
Cloud Function that uses BigQuery to parse the HTTP response log data in Cloud Logging for the • A. Increase the size of the disk to 1 TB.
current month and sends an email if the size of all HTTP responses, multiplied by current Google • B. Increase the allocated CPU to the instance.
Cloud egress prices, totals over 100 dollars. Schedule the Cloud Function using Cloud Scheduler • C. Migrate to use a Local SSD on the instance.
to run hourly. • D. Migrate to use a Regional SSD on the instance.
Correct Answer: C Correct Answer: C
• A. For each Google Cloud product in the solution, review the pricing details on the products • A. Modify the existing subnet range to 172.16.20.0/24. Most Voted
pricing page. Use the pricing calculator to total the monthly costs for each Google Cloud product. • B. Create a new Secondary IP Range in the VPC and configure the VMs to use that range.
• B. For each Google Cloud product in the solution, review the pricing details on the products • C. Create a new VPC network for the VMs. Enable VPC Peering between the VMs' VPC network
pricing page. Create a Google Sheet that summarizes the expected monthly costs for each and the Dataproc cluster VPC network. Most Voted
product. • D. Create a new VPC network for the VMs with a subnet of 172.32.0.0/16. Enable VPC network
• C. Provision the solution on Google Cloud. Leave the solution provisioned for 1 week. Navigate to Peering between the Dataproc VPC network and the VMs VPC network. Configure a custom Route
the Billing Report page in the Cloud Console. Multiply the 1 week cost to determine the monthly exchange.
costs.
• D. Provision the solution on Google Cloud. Leave the solution provisioned for 1 week. Use Cloud Correct Answer: C
Monitoring to determine the provisioned and used resource amounts. Multiply the 1 week cost to
determine the monthly costs. Question 130
You manage an App Engine Service that aggregates and visualizes data from BigQuery. The application is
Correct Answer: A deployed with the default App Engine Service account.
The data that needs to be visualized resides in a different project managed by another team. You do not
Question 127 have access to this project, but you want your application to be able to read data from the BigQuery
You have an application that receives SSL-encrypted TCP traffic on port 443. Clients for this application dataset. What should you do?
are located all over the world. You want to minimize latency for the clients. Which load balancing option
should you use?
• A. Ask the other team to grant your default App Engine Service account the role of BigQuery Job
User.
• A. HTTPS Load Balancer • B. Ask the other team to grant your default App Engine Service account the role of BigQuery Data
• B. Network Load Balancer Viewer.
• C. SSL Proxy Load Balancer • C. In Cloud IAM of your project, ensure that the default App Engine service account has the role of
• D. Internal TCP/UDP Load Balancer. Add a firewall rule allowing ingress traffic from 0.0.0.0/0 on BigQuery Data Viewer.
the target instances. • D. In Cloud IAM of your project, grant a newly created service account from the other team the
role of BigQuery Job User in your project
Correct Answer: C
Question 128
You have an application on a general-purpose Compute Engine instance that is experiencing excessive
Correct Answer: B
disk read throttling on its Zonal SSD Persistent Disk. The application primarily reads large files from disk.
The disk size is currently 350 GB. You want to provide the maximum amount of throughput while
Question 131 Question 134
You need to create a copy of a custom Compute Engine virtual machine (VM) to facilitate an expected You built an application on your development laptop that uses Google Cloud services. Your application
increase in application traffic due to a business acquisition. uses Application Default Credentials for authentication and works fine on your development laptop. You
What should you do? want to migrate this application to a Compute Engine virtual machine (VM) and set up authentication
using Google- recommended practices and minimal changes. What should you do?
• A. Create a Compute Engine snapshot of your base VM. Create your images from that snapshot.
• B. Create a Compute Engine snapshot of your base VM. Create your instances from that • A. Assign appropriate access for Google services to the service account used by the Compute
snapshot. Engine VM.
• C. Create a custom Compute Engine image from a snapshot. Create your images from that image. • B. Create a service account with appropriate access for Google services, and configure the
• D. Create a custom Compute Engine image from a snapshot. Create your instances from that application to use this account.
image. • C. Store credentials for service accounts with appropriate access for Google services in a config
file, and deploy this config file with your application.
Correct Answer: B • D. Store credentials for your user account with appropriate access for Google services in a config
file, and deploy this config file with your application.
Question 132
You have deployed an application on a single Compute Engine instance. The application writes logs to Correct Answer: B
disk. Users start reporting errors with the application. You want to diagnose the problem. What should Reference: https://cloud.google.com/compute/docs/access/create-enable-service-accounts-for-instances
you do?
Question 135
You need to create a Compute Engine instance in a new project that doesn't exist yet. What should you
• A. Navigate to Cloud Logging and view the application logs.
do?
• B. Connect to the instance's serial console and read the application logs.
• C. Configure a Health Check on the instance and set a Low Healthy Threshold value.
• D. Install and configure the Cloud Logging Agent and view the logs from Cloud Logging. • A. Using the Cloud SDK, create a new project, enable the Compute Engine API in that project, and
then create the instance specifying your new project.
Correct Answer: D • B. Enable the Compute Engine API in the Cloud Console, use the Cloud SDK to create the
instance, and then use the --project flag to specify a new project.
Question 133 • C. Using the Cloud SDK, create the new instance, and use the --project flag to specify the new
An application generates daily reports in a Compute Engine virtual machine (VM). The VM is in the project. Answer yes when prompted by Cloud SDK to enable the Compute Engine API.
project corp-iot-insights. Your team operates only in the project corp-aggregate-reports and needs a copy • D. Enable the Compute Engine API in the Cloud Console. Go to the Compute Engine section of the
of the daily exports in the bucket corp-aggregate-reports-storage. You want to configure access so that Console to create a new instance, and look for the Create In A New Project option in the creation
the daily reports from the VM are available in the bucket corp-aggregate-reports-storage and use as few form.
steps as possible while following Google-recommended practices. What should you do?
Correct Answer: A
• A. Move both projects under the same folder.
Question 136
• B. Grant the VM Service Account the role Storage Object Creator on corp-aggregate-reports-
Your company runs one batch process in an on-premises server that takes around 30 hours to complete.
storage.
The task runs monthly, can be performed offline, and must be restarted if interrupted. You want to
• C. Create a Shared VPC network between both projects. Grant the VM Service Account the role
migrate this workload to the cloud while minimizing cost. What should you do?
Storage Object Creator on corp-iot-insights.
• D. Make corp-aggregate-reports-storage public and create a folder with a pseudo-randomized
suffix name. Share the folder with the IoT team. • A. Migrate the workload to a Compute Engine Preemptible VM.
• B. Migrate the workload to a Google Kubernetes Engine cluster with Preemptible nodes.
Correct Answer: B • C. Migrate the workload to a Compute Engine VM. Start and stop the instance as needed.
Reference: https://cloud.google.com/billing/docs/onboarding-checklist • D. Create an Instance Template with Preemptible VMs On. Create a Managed Instance Group
from the template and adjust Target CPU Utilization. Migrate the workload.
Correct Answer: C
Question 137 Question 140
You are developing a new application and are looking for a Jenkins installation to build and deploy your You are asked to set up application performance monitoring on Google Cloud projects A, B, and C as a
source code. You want to automate the installation as quickly and easily as possible. What should you single pane of glass. You want to monitor CPU, memory, and disk. What should you do?
do?
• A. Enable API and then share charts from project A, B, and C.
• A. Deploy Jenkins through the Google Cloud Marketplace. • B. Enable API and then give the metrics.reader role to projects A, B, and C.
• B. Create a new Compute Engine instance. Run the Jenkins executable. • C. Enable API and then use default dashboards to view all projects in sequence.
• C. Create a new Kubernetes Engine cluster. Create a deployment for the Jenkins image. • D. Enable API, create a workspace under project A, and then add projects B and C.
• D. Create an instance template with the Jenkins executable. Create a managed instance group
with this template. Correct Answer: D
Correct Answer: A
• A. Use gcloud container clusters upgrade. Deploy the new services.
• B. Create a new Node Pool and specify machine type n2ג€"highmem16"€ ג. Deploy the new pods.
• C. Create a new cluster with n2ג€"highmem16"€ גnodes. Redeploy the pods and delete the old Question 148
cluster. A colleag ue handed over a Google Cloud Platform project for you to maintai n. As part of a securi ty
• D. Create a new cluster with both n1ג€"standard2"€ גand n2ג€"highmem16"€ גnodes. Redeploy checkup, you want to review who has been granted the Project
the pods and delete the old cluster. Owner role. What should you do?
Correct Answer: B • A. In the console, validate which SSH keys have been stored as project-wide keys.
• B. Navigate to Identity-Aware Proxy and check the permissions for these resources.
• C. Enable Audit Logs on the IAM & admin page for all resources, and validate the results.
• D. Use the command gcloud projects getג€"iamג€"policy to view the current role assignments.
Correct Answer: D Question 152
Your company runs its Linux workloads on Compute Engine instances. Your company will be
Question 149 working with a new operations partner that does not use Google
You are running multiple VPC-native Google Kubernetes Engine clusters in the same subnet. The Accounts. You need to grant access to the instances to your operations partner so they can
IPs available for the nodes are exhausted, and you want to ensure that the clusters can grow in maintain the installed tooling. What should you do?
nodes when needed. What should you do?
• A. Enable Cloud IAP for the Compute Engine instances, and add the operations partner as a Cloud
• A. Create a new subnet in the same region as the subnet being used. IAP Tunnel User.
• B. Add an alias IP range to the subnet used by the GKE clusters. • B. Tag all the instances with the same network tag. Create a firewall rule in the VPC to grant TCP
• C. Create a new VPC, and set up VPC peering with the existing VPC. access on port 22 for traffic from the operations partner to instances with the network tag.
• D. Expand the CIDR range of the relevant subnet for the cluster. • C. Set up Cloud VPN between your Google Cloud VPC and the internal network of the operations
partner.
Correct Answer: D • D. Ask the operations partner to generate SSH key pairs, and add the public keys to the VM
instances.
• A. Run a test using simulated maintenance events. If the test is successful, use preemptible N1 Question 153
Standard VMs when running future jobs. You have created a code snippet that should be triggered whenever a new file is uploaded to a
• B. Run a test using simulated maintenance events. If the test is successful, use N1 Standard VMs Cloud Storage bucket. You want to deploy this code snippet. What should you do?
when running future jobs.
• C. Run a test using a managed instance group. If the test is successful, use N1 Standard VMs in • A. Use App Engine and configure Cloud Scheduler to trigger the application using Pub/Sub.
the managed instance group when running future jobs. • B. Use Cloud Functions and configure the bucket as a trigger resource.
• D. Run a test using N1 standard VMs instead of N2. If the test is successful, use N1 Standard • C. Use Google Kubernetes Engine and configure a CronJob to trigger the application using
VMs when running future jobs. Pub/Sub.
• D. Use Dataflow as a batch job, and configure the bucket as a data source.
Correct Answer: A
Reference: Correct Answer: B
https://cloud.goog le.com/compute/vm -instance-prici ng
Question 154
Question 151 You have been asked to set up Object Lifecycle Management for objects stored in storage buckets.
You are working with a user to set up an application in a new VPC behind a firewall. The user is The objects are written once and accessed frequently for 30 days. After 30 days, the objects are
concerned about data egress. You want to configure the fewest open egress ports. What should not read again unless there is a special need. The objects should be kept for three years, and you
you do? need to minimize cost.
What should you do?
• A. Set up a low-priority (65534) rule that blocks all egress and a high-priority rule (1000) that
allows only the appropriate ports. • A. Set up a policy that uses Nearline storage for 30 days and then moves to Archive storage for
• B. Set up a high-priority (1000) rule that pairs both ingress and egress ports. three years.
• C. Set up a high-priority (1000) rule that blocks all egress and a low-priority (65534) rule that • B. Set up a policy that uses Standard storage for 30 days and then moves to Archive storage for
allows only the appropriate ports. three years.
• D. Set up a high-priority (1000) rule to allow the appropriate ports. • C. Set up a policy that uses Nearline storage for 30 days, then moves the Coldline for one year,
and then moves to Archive storage for two years.
Correct Answer: A
• D. Set up a policy that uses Standard storage for 30 days, then moves to Coldline for one year, Question 157
and then moves to Archive storage for two years. You are deployi ng a produc tion applicati on on Compute Engine. You want to prevent anyone from
accidentally destroying the instance by clicking the wrong button. What should you do?
Correct Answer: B
Reference: • A. Disable the flag ג€Delete boot disk when instance is deleted.ג€
https://books.google.com.pk/books?id=q0nhDwAAQBAJ&pg=PA52&lpg=PA52&dq=Set+up+a+poli • B. Enable delete protection on the instance.
cy+that+uses+Nearline+storage+for+30+days+and • C. Disable Automatic restart on the instance.
+then+moves+to+Archive+storage+for+three • D. Enable Preemptibility on the instance.
+years.&source=bl&ots=kYLZN1ymA8&sig=ACfU3U2XLmzQ39cmPDwjfWxRbNtDNLc_6g&hl=en&sa
=X&ved=2ahUKEwjZmefOpr7qAhVzQkEAHTUgASYQ6AE Correct Answer: B
wAHoECAoQAQ#v=onepage&q=Set%20up%20a%20policy%20that%20uses%20Nearline%20storage Reference:
%20for%2030%20days%20and%20then%20moves%20to https://goog lecloudplatform.uservoice.com/forums/302595-com pute-
%20Archive%20storage%20for%20three%20years.&f=false engine/sugg es tions/14227521 -set-delete-boot-di sk -when-ins tance-i s-deleted-to
Questi on 158
Your company uses a large number of Google Cloud services centralized in a single project. All
Question 155 teams have specific projects for testing and development. The
You are storing sensitive information in a Cloud Storage bucket. For legal reasons, you need to be DevOps team needs access to all of the produc tion services in order to perform their job. You want
able to record all requests that read any of the stored data. You want to make sure you comply to prevent Google Cloud product changes from broadening their permissions in the future. You
with these requirements. What should you do? want to follow Google-recommended practices. What should you do?
• A. Enable the Identity Aware Proxy API on the project. • A. Grant all members of the DevOps team the role of Project Editor on the organization level.
• B. Scan the bucket using the Data Loss Prevention API. • B. Grant all members of the DevOps team the role of Project Editor on the production project.
• C. Allow only a single Service Account access to read the data. • C. Create a custom role that combines the required permissions. Grant the DevOps team the
• D. Enable Data Access audit logs for the Cloud Storage API. custom role on the production project.
• D. Create a custom role that combines the required permissions. Grant the DevOps team the
Correct Answer: D
custom role on the organization level.
Reference:
https://cloud.goog le.com/storag e/doc s/audit-log s Correct Answer: C
Questi on 159
Question 156 You are building an application that processes data files uploaded from thousands of suppliers.
You are the team lead of a group of 10 developers. You provided each developer with an individual Your primary goals for the application are data security and the expiration of aged data. You need
Google Cloud Project that they can use as their personal sandbox to experiment with different to design the application to:
Google Cloud solutions. You want to be notified if any of the developers are spending above $500 ג€¢ Restrict access so that suppliers can access only their own data.
per month on their sandbox environment. What should you do? ג€¢ Give suppliers write access to data only for 30 minutes.
ג€¢ Delete data that is over 45 days old.
• A. Create a single budget for all projects and configure budget alerts on this budget. You have a very short developm ent cycle, and you need to make sure that the application requires
• B. Create a separate billing account per sandbox project and enable BigQuery billing exports. minimal maintenance. Which two strategies should you use?
Create a Data Studio dashboard to plot the spending per billing account. (Choose two.)
• C. Create a budget per project and configure budget alerts on all of these budgets.
• D. Create a single billing account for all sandbox projects and enable BigQuery billing exports. • A. Build a lifecycle policy to delete Cloud Storage objects after 45 days.
Create a Data Studio dashboard to plot the spending per project. • B. Use signed URLs to allow suppliers limited time access to store their objects.
• C. Set up an SFTP server for your application, and create a separate user for each supplier.
Correct Answer: C • D. Build a Cloud function that triggers a timer of 45 days to delete objects that have expired.
Reference: • E. Develop a script that loops through all Cloud Storage buckets and deletes any buckets that are
https://cloud.goog le.com/billing /docs/how -to/budgets older than 45 days.
Correct Answer: A B
Question 160 Question 163
Your company wants to standardize the creation and management of multiple Google Cloud You have developed a containerized web application that will serve internal colleagues during
resources using Infrastructure as Code. You want to minimize the amount of repetitive code business hours. You want to ensure that no costs are incurred outside of the hours the application
needed to manage the environment. What should you do? is used. You have just created a new Google Cloud project and want to deploy the application.
What should you do?
• A. Develop templates for the environment using Cloud Deployment Manager.
• B. Use curl in a terminal to send a REST request to the relevant Google API for each individual • A. Deploy the container on Cloud Run for Anthos, and set the minimum number of instances to
resource. zero.
• C. Use the Cloud Console interface to provision and manage all related resources. • B. Deploy the container on Cloud Run (fully managed), and set the minimum number of instances
• D. Create a bash script that contains all requirement steps as gcloud commands. to zero.
• C. Deploy the container on App Engine flexible environment with autoscaling, and set the value
Correct Answer: A min_instances to zero in the app.yaml.
Reference: • D. Deploy the container on App Engine flexible environment with manual scaling, and set the
https://cloud.goog le.com/deploym ent-manag er/docs/fundamentals value instances to zero in the app.yaml.
Correct Answer: B
Question 161
You are performi ng a monthly security check of your Google Cloud environm ent and want to know Questi on 164
who has access to view data stored in your Google Cloud You have experimented with Google Cloud using your own credit card and expensed the costs to
Project. What should you do? your company. Your company wants to streamline the billing process and charge the costs of your
projects to their monthly invoice. What should you do?
• A. Enable Audit Logs for all APIs that are related to data storage.
• B. Review the IAM permissions for any role that allows for data access. • A. Grant the financial team the IAM role of ג€Billing Account Userג€ on the billing account linked
• C. Review the Identity-Aware Proxy settings for each resource. to your credit card.
• D. Create a Data Loss Prevention job. • B. Set up BigQuery billing export and grant your financial department IAM access to query the
data.
Correct Answer: B
• C. Create a ticket with Google Billing Support to ask them to send the invoice to your company.
Reference: https://cloud.google.com/compute/docs/access • D. Change the billing account of your projects to the billing account of your company.
Question 190
The sales team has a project named Sales Data Digest that has the ID acme-data-digest. You need
to set up similar Google Cloud resources for the marketing team but their resources must be
organized independently of the sales team. What should you do?
• A. Grant the Project Editor role to the Marketing team for acme-data-digest.
• B. Create a Project Lien on acme-data-digest and then grant the Project Editor role to the
Marketing team.
• C. Create another project with the ID acme-marketing-data-digest for the Marketing team and
deploy the resources there.
• D. Create a new project named Marketing Data Digest and use the ID acme-data-digest. Grant the
Project Editor role to the Marketing team.
Correct Answer: C
Question 191
You have deployed multiple Linux instances on Compute Engine. You plan on adding more
instances in the coming weeks. You want to be able to access all of these instances through your
SSH client over the internet without having to configure specific access on the existing and new
instances. You do not want the
Compute Engine instances to have a public IP. What should you do?
Correct Answer: B