πŸ”

ACE β€” questions

Page 4 of 17 Β· 334 total questions.

Topic 1 Β· Question 61

Your organization is a financial 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. What should you do?

  • ACreate an export to the sink that saves logs from Cloud Audit to BigQuery.
  • BCreate an export to the sink that saves logs from Cloud Audit to a Coldline Storage bucket. (correct answer)
  • CWrite a custom script that uses logging API to copy the logs from Stackdriver logs to BigQuery.
  • DExport these logs to Cloud Pub/Sub and write a Cloud Dataflow pipeline to store logs to Cloud SQL.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Create an export to the sink that saves logs from Cloud Audit to a Coldline Storage bucket. This option delivers the requirement at the lowest cost.

Topic 1 Β· Question 62

You want to run a single caching HTTP reverse proxy on GCP for a latency-sensitive website. This specific reverse proxy consumes almost no CPU. You want to have a 30-GB in-memory cache, and need an additional 2 GB of memory for the rest of the processes. You want to minimize cost. How should you run this reverse proxy?

  • ACreate a Cloud Memorystore for Redis instance with 32-GB capacity. (correct answer)
  • BRun it on Compute Engine, and choose a custom instance type with 6 vCPUs and 32 GB of memory.
  • CPackage it in a container image, and run it on Kubernetes Engine, using n1-standard-32 instances as nodes.
  • DRun it on Compute Engine, choose the instance type n1-standard-1, and add an SSD persistent disk of 32 GB.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Create a Cloud Memorystore for Redis instance with 32-GB capacity.

Explanation

Memorystore provides managed in-memory Redis/Memcached caching to reduce latency and offload databases. This option delivers the requirement at the lowest cost.

Topic 1 Β· 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?

  • A1. Use nslookup to get the IP address for storage.googleapis.com. 2. Negotiate with the security team to be able to give a public IP address to the servers. 3. Only allow egress traffic from those servers to the IP addresses for storage.googleapis.com.
  • B1. Using Cloud VPN, create a VPN tunnel to a Virtual Private Cloud (VPC) in Google 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.
  • C1. 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 storage.googleapis.com as backend. 3. Configure your new instances to use this ILB as proxy.
  • D1. Using Cloud VPN or Interconnect, create a tunnel to a VPC in Google Cloud. 2. Use Cloud Router to create a custom route advertisement for 199.36.153.4/30. 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. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: 1. Using Cloud VPN or Interconnect, create a tunnel to a VPC in Google Cloud. 2. Use Cloud Router to create a custom route advertisement for 199.36.153.4/30. Announce that network to your on-premises network through t...

Explanation

Cloud VPN provides encrypted IPsec connectivity between on premises and a VPC. A VPC provides a global, software-defined private network for your Google Cloud resources.

Topic 1 Β· Question 64

You want to deploy an application on Cloud Run that processes messages from a Cloud Pub/Sub topic. You want to follow Google-recommended practices. What should you do?

  • A1. 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.
  • B1. Grant the Pub/Sub Subscriber role to the service account used by Cloud Run. 2. Create a Cloud Pub/Sub subscription for that topic. 3. Make your application pull messages from that subscription. (correct answer)
  • C1. Create a service account. 2. Give the Cloud Run Invoker role to that service account for your Cloud Run application. 3. Create a Cloud Pub/Sub subscription that uses that service account and uses your Cloud Run application as the push endpoint.
  • D1. Deploy your application on Cloud Run on GKE with the connectivity set to Internal. 2. Create a Cloud Pub/Sub subscription for that topic. 3. In the same Google Kubernetes Engine cluster as your application, deploy a container that takes the messages and sends them to your application.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: 1. Grant the Pub/Sub Subscriber role to the service account used by Cloud Run. 2. Create a Cloud Pub/Sub subscription for that topic. 3. Make your application pull messages from that subscription.

Explanation

Cloud Run runs stateless containers serverlessly and scales to zero, minimizing operational overhead. Pub/Sub is a serverless, global messaging service that decouples services and ingests high-volume event streams. A service account provides an identity for workloads to access Google Cloud APIs securely.

Topic 1 Β· 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?

  • ADeploy the container on Cloud Run. (correct answer)
  • BDeploy the container on Cloud Run on GKE.
  • CDeploy the container on App Engine Flexible.
  • DDeploy the container on GKE with cluster autoscaling and horizontal pod autoscaling enabled.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Deploy the container on Cloud Run.

Explanation

Cloud Run runs stateless containers serverlessly and scales to zero, minimizing operational overhead. This option delivers the requirement at the lowest cost.

Topic 1 Β· Question 66

Your company has an existing GCP organization with hundreds of projects and a billing account. Your company recently acquired another company that also has hundreds of projects and its own billing account. You would like to consolidate all GCP costs of both GCP organizations onto a single invoice. You would like to consolidate all costs as of tomorrow. What should you do?

  • ALink the acquired company's projects to your company's billing account. (correct answer)
  • BConfigure the acquired company's billing account and your company's billing account to export the billing data into the same BigQuery dataset.
  • CMigrate the acquired company's projects into your company's GCP organization. Link the migrated projects to your company's billing account.
  • DCreate a new GCP organization and a new billing account. Migrate the acquired company's projects and your company's projects into the new GCP organization and link the projects to the new billing account.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Link the acquired company's projects to your company's billing account.

Topic 1 Β· Question 67

You built an application on Google Cloud that uses Cloud Spanner. Your support team needs to monitor the environment but should not have access to table data. You need a streamlined solution to grant the correct permissions to your support team, and you want to follow Google-recommended practices. What should you do?

  • AAdd the support team group to the roles/monitoring.viewer role (correct answer)
  • BAdd the support team group to the roles/spanner.databaseUser role.
  • CAdd the support team group to the roles/spanner.databaseReader role.
  • DAdd the support team group to the roles/stackdriver.accounts.viewer role.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Add the support team group to the roles/monitoring.viewer role.

Topic 1 Β· Question 68

For analysis purposes, you need to send all the logs from all of your Compute Engine instances to a BigQuery dataset called platform-logs. You have already installed the Cloud Logging agent on all the instances. You want to minimize cost. What should you do?

  • A1. 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-destination: bq://platform-logs.
  • B1. In Cloud Logging, create a logs export with a Cloud Pub/Sub topic called logs as a sink. 2. Create a Cloud Function that is triggered by messages in the logs topic. 3. Configure that Cloud Function to drop logs that are not from Compute Engine and to insert Compute Engine logs in the platform-logs dataset.
  • C1. 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. (correct answer)
  • D1. Create a Cloud Function that has the BigQuery User role on the platform-logs dataset. 2. Configure this Cloud Function to create a BigQuery Job that executes this query: INSERT INTO dataset.platform-logs (timestamp, log) SELECT timestamp, log FROM compute.logs WHERE timestamp > DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY) 3. Use Cloud Scheduler to trigger this Cloud Function once a day.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option 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.

Explanation

Compute Engine provides configurable virtual machines when you need full control of the OS. BigQuery is a serverless, petabyte-scale data warehouse for fast SQL analytics with no infrastructure to manage. Cloud Logging centralizes, stores, and analyzes logs across services. This option delivers the requirement at the lowest cost.

Topic 1 Β· Question 69

You are using Deployment Manager to create a Google Kubernetes Engine cluster. Using the same Deployment Manager deployment, you also want to create a DaemonSet in the kube-system namespace of the cluster. You want a solution that uses the fewest possible services. What should you do?

  • AAdd the cluster's API as a new Type Provider in Deployment Manager, and use the new type to create the DaemonSet. (correct answer)
  • BUse the Deployment Manager Runtime Configurator to create a new Config resource that contains the DaemonSet definition.
  • CWith Deployment Manager, create a Compute Engine instance with a startup script that uses kubectl to create the DaemonSet.
  • DIn the cluster's definition in Deployment Manager, add a metadata that has kube-system as key and the DaemonSet manifest as value.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Add the cluster's API as a new Type Provider in Deployment Manager, and use the new type to create the DaemonSet.

Explanation

Deployment Manager provisions Google Cloud infrastructure as code.

Topic 1 Β· Question 70

You are building an application that will run in your data center. The application will use Google Cloud Platform (GCP) services like AutoML. You created a service account that has appropriate access to AutoML. You need to enable authentication to the APIs from your on-premises environment. What should you do?

  • AUse service account credentials in your on-premises application.
  • BUse gcloud to create a key file for the service account that has appropriate permissions. (correct answer)
  • CSet up direct interconnect between your data center and Google Cloud Platform to enable authentication for your on-premises applications.
  • DGo to the IAM & admin console, grant a user account permissions similar to the service account permissions, and use this user account for authentication from your data center.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Use gcloud to create a key file for the service account that has appropriate permissions.

Explanation

A service account provides an identity for workloads to access Google Cloud APIs securely.

Topic 1 Β· 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 Kubernetes Engine (GKE) cluster. You want to ensure that Kubernetes can download images from Container Registry. What should you do?

  • AIn the project where the images are stored, grant the Storage Object Viewer IAM role to the service account used by the Kubernetes nodes. (correct answer)
  • BWhen you create the GKE cluster, choose the Allow full access to all Cloud APIs option under 'Access scopes'.
  • CCreate 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.
  • DConfigure the ACLs on each image in Cloud Storage to give read-only access to the default Compute Engine service account.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: In the project where the images are stored, grant the Storage Object Viewer IAM role to the service account used by the Kubernetes nodes.

Explanation

A service account provides an identity for workloads to access Google Cloud APIs securely. Cloud IAM grants fine-grained, least-privilege access to Google Cloud resources.

Topic 1 Β· Question 72

You deployed a new application inside your Google Kubernetes Engine cluster using the YAML file specified below. You check the status of the deployed pods and notice that one of them is still in PENDING status: You want to find out why the pod is stuck in pending status. What should you do?

  • AReview details of the myapp-service Service object and check for error messages.
  • BReview details of the myapp-deployment Deployment object and check for error messages.
  • CReview details of myapp-deployment-58ddbbb995-lp86m Pod and check for warning messages. (correct answer)
  • DView logs of the container in myapp-deployment-58ddbbb995-lp86m pod and check for warning messages.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Review details of myapp-deployment-58ddbbb995-lp86m Pod and check for warning messages.

Topic 1 Β· 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?

  • AAfter the VM has been created, use your Google Account credentials to log in into the VM.
  • BAfter the VM has been created, use gcloud compute reset-windows-password to retrieve the login credentials for the VM. (correct answer)
  • CWhen creating the VM, add metadata to the instance using 'windows-password' as the key and a password as the value.
  • DAfter 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.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: After the VM has been created, use gcloud compute reset-windows-password to retrieve the login credentials for the VM.

Topic 1 Β· 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 connect to. What should you do?

  • ASet metadata to enable-oslogin=true for the instance. Grant the dev1 group the compute.osLogin role. Direct them to use the Cloud Shell to ssh to that instance. (correct answer)
  • BSet 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.
  • CEnable 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.
  • DEnable 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 to connect.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Set metadata to enable-oslogin=true for the instance. Grant the dev1 group the compute.osLogin role. Direct them to use the Cloud Shell to ssh to that instance.

Topic 1 Β· Question 75

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?

  • ARun gcloud projects list to get the project ID, and then run gcloud services list --project . (correct answer)
  • BRun gcloud init to set the current project to my-project, and then run gcloud services list --available.
  • CRun gcloud info to view the account value, and then run gcloud services list --account .
  • DRun gcloud projects describe to verify the project value, and then run gcloud services list --available.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Run gcloud projects list to get the project ID, and then run gcloud services list --project.

Topic 1 Β· Question 76

You are building a new version of an application hosted in an App Engine environment. You want to test the new version with 1% of users before you completely switch your application over to the new version. What should you do?

  • ADeploy a new version of your application in Google Kubernetes Engine instead of App Engine and then use GCP Console to split traffic.
  • BDeploy a new version of your application in a Compute Engine instance instead of App Engine and then use GCP Console to split traffic.
  • CDeploy a new version as a separate app in App Engine. Then configure App Engine using GCP Console to split traffic between the two apps.
  • DDeploy a new version of your application in App Engine. Then go to App Engine settings in GCP Console and split traffic between the current version and newly deployed versions accordingly. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Deploy a new version of your application in App Engine. Then go to App Engine settings in GCP Console and split traffic between the current version and newly deployed versions accordingly.

Explanation

App Engine is a fully managed platform that runs and autoscales web apps with little operational effort.

Topic 1 Β· Question 77

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 by entering the number of nodes, average hours, and average days. What should you do next?

  • AFill in local SSD. Fill in persistent disk storage and snapshot storage. (correct answer)
  • BFill in local SSD. Add estimated cost for cluster management.
  • CSelect Add GPUs. Fill in persistent disk storage and snapshot storage.
  • DSelect Add GPUs. Add estimated cost for cluster management.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Fill in local SSD. Fill in persistent disk storage and snapshot storage.

Explanation

Persistent Disk provides durable block storage attached to Compute Engine VMs. Local SSDs offer very high-IOPS ephemeral block storage physically attached to the VM.

Topic 1 Β· Question 78

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?

  • ACreate a Kubernetes Service of type NodePort for your application, and a Kubernetes Ingress to expose this Service via a Cloud Load Balancer. (correct answer)
  • BCreate a Kubernetes Service of type ClusterIP for your application. Configure the public DNS name of your application using the IP of this Service.
  • CCreate 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 every node of the cluster to achieve load-balancing.
  • DCreate a HAProxy pod in the cluster to load-balance the traffic to all the pods of the application. Forward the public traffic to HAProxy with an iptable rule. Configure the DNS name of your application using the public IP of the node HAProxy is running on.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Create a Kubernetes Service of type NodePort for your application, and a Kubernetes Ingress to expose this Service via a Cloud Load Balancer.

Explanation

A load balancer distributes traffic across healthy backends in multiple zones for availability and scale.

Topic 1 Β· Question 79

You need to enable traffic between multiple groups of Compute Engine instances that are currently running two different GCP projects. Each group of Compute Engine instances is running in its own VPC. What should you do?

  • AVerify that both projects are in a GCP Organization. Create a new VPC and add all instances.
  • BVerify 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. (correct answer)
  • CVerify that you are the Project Administrator of both projects. Create two new VPCs and add all instances.
  • DVerify that you are the Project Administrator of both projects. Create a new VPC and add all instances.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option 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.

Explanation

Compute Engine provides configurable virtual machines when you need full control of the OS. Shared VPC centralizes network administration by sharing one VPC across multiple projects. A VPC provides a global, software-defined private network for your Google Cloud resources.

Topic 1 Β· Question 80

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?

  • ACreate a custom role with view-only project permissions. Add the user's account to the custom role.
  • BCreate a custom role with view-only service permissions. Add the user's account to the custom role.
  • CSelect the built-in IAM project Viewer role. Add the user's account to this role. (correct answer)
  • DSelect the built-in IAM service Viewer role. Add the user's account to this role.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Select the built-in IAM project Viewer role. Add the user's account to this role.

Explanation

Cloud IAM grants fine-grained, least-privilege access to Google Cloud resources.

Showing questions 61–80 of 334 Β· Page 4 of 17