πŸ”

PCA β€” questions

Page 10 of 17 Β· 337 total questions.

Topic 1 Β· Question 181

You have a Compute Engine managed instance group that adds and removes Compute Engine instances from the group in response to the load on your application. The instances have a shutdown script that removes REDIS database entries associated with the instance. You see that many database entries have not been removed, and you suspect that the shutdown script is the problem. You need to ensure that the commands in the shutdown script are run reliably every time an instance is shut down. You create a Cloud Function to remove the database entries. What should you do next?

  • AModify the shutdown script to wait for 30 seconds before triggering the Cloud Function.
  • BDo not use the Cloud Function. Modify the shutdown script to restart if it has not completed in 30 seconds.
  • CSet up a Cloud Monitoring sink that triggers the Cloud Function after an instance removal log message arrives in Cloud Logging. (correct answer)
  • DModify the shutdown script to wait for 30 seconds and then publish a message to a Pub/Sub queue.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Set up a Cloud Monitoring sink that triggers the Cloud Function after an instance removal log message arrives in Cloud Logging.

Explanation

Cloud Monitoring collects metrics, dashboards, and alerts to observe system health. Cloud Logging centralizes, stores, and analyzes logs across services.

Topic 1 Β· Question 182

You are managing several projects on Google Cloud and need to interact on a daily basis with BigQuery, Bigtable, and Kubernetes Engine using the gcloud CL tool. You are travelling a lot and work on different workstations during the week. You want to avoid having to manage the gcloud CLI manually. What should you do?

  • AUse Google Cloud Shell in the Google Cloud Console to interact with Google Cloud. (correct answer)
  • BCreate a Compute Engine instance and install gcloud on the instance. Connect to this instance via SSH to always use the same gcloud installation when interacting with Google Cloud.
  • CInstall gcloud on all of your workstations. Run the command gcloud components auto-update on each workstation
  • DUse a package manager to install gcloud on your workstations instead of installing it manually.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Use Google Cloud Shell in the Google Cloud Console to interact with Google Cloud.

Topic 1 Β· Question 183

Your company recently acquired a company that has infrastructure in Google Cloud. Each company has its own Google Cloud organization. Each company is using a Shared Virtual Private Cloud (VPC) to provide network connectivity for its applications. Some of the subnets used by both companies overlap. In order for both businesses to integrate, the applications need to have private network connectivity. These applications are not on overlapping subnets. You want to provide connectivity with minimal re-engineering. What should you do?

  • ASet up VPC peering and peer each Shared VPC together.
  • BMigrate the projects from the acquired company into your company's Google Cloud organization. Re-launch the instances in your companies Shared VPC.
  • CSet up a Cloud VPN gateway in each Shared VPC and peer Cloud VPNs. (correct answer)
  • DConfigure SSH port forwarding on each application to provide connectivity between applications in the different Shared VPCs.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Set up a Cloud VPN gateway in each Shared VPC and peer Cloud VPNs.

Explanation

Cloud VPN provides encrypted IPsec connectivity between on premises and a VPC. 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 184

You are managing several internal applications that are deployed on Compute Engine. Business users inform you that an application has become very slow over the past few days. You want to find the underlying cause in order to solve the problem. What should you do first?

  • AInspect the logs and metrics from the instances in Cloud Logging and Cloud Monitoring. (correct answer)
  • BChange the Compute Engine Instances behind the application to a machine type with more CPU and memory.
  • CRestore a backup of the application database from a time before the application became slow.
  • DDeploy the applications on a managed instance group with autoscaling enabled. Add a load balancer in front of the managed instance group, and have the users connect to the IP of the load balancer.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Inspect the logs and metrics from the instances in Cloud Logging and Cloud Monitoring.

Explanation

Cloud Monitoring collects metrics, dashboards, and alerts to observe system health. Cloud Logging centralizes, stores, and analyzes logs across services.

Topic 1 Β· Question 185

Your company has an application running as a Deployment in a Google Kubernetes Engine (GKE) cluster. When releasing new versions of the application via a rolling deployment, the team has been causing outages. The root cause of the outages is misconfigurations with parameters that are only used in production. You want to put preventive measures for this in the platform to prevent outages. What should you do?

  • AConfigure liveness and readiness probes in the Pod specification. (correct answer)
  • BConfigure health checks on the managed instance group.
  • CCreate a Scheduled Task to check whether the application is available.
  • DConfigure an uptime alert in Cloud Monitoring.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Configure liveness and readiness probes in the Pod specification.

Topic 1 Β· Question 186

Your company uses Google Kubernetes Engine (GKE) as a platform for all workloads. Your company has a single large GKE cluster that contains batch, stateful, and stateless workloads. The GKE cluster is configured with a single node pool with 200 nodes. Your company needs to reduce the cost of this cluster but does not want to compromise availability. What should you do?

  • ACreate a second GKE cluster for the batch workloads only. Allocate the 200 original nodes across both clusters.
  • BConfigure CPU and memory limits on the namespaces in the cluster. Configure all Pods to have a CPU and memory limits.
  • CConfigure a HorizontalPodAutoscaler for all stateless workloads and for all compatible stateful workloads. Configure the cluster to use node auto scaling. (correct answer)
  • DChange the node pool to use preemptible VMs.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Configure a HorizontalPodAutoscaler for all stateless workloads and for all compatible stateful workloads. Configure the cluster to use node auto scaling.

Topic 1 Β· Question 187

Your company has a Google Cloud project that uses BigQuery for data warehousing on a pay-per-use basis. You want to monitor queries in real time to discover the most costly queries and which users spend the most. What should you do?

  • A1. In the BigQuery dataset that contains all the tables to be queried, add a label for each user that can launch a query. 2. Open the Billing page of the project. 3. Select Reports. 4. Select BigQuery as the product and filter by the user you want to check.
  • B1. Create a Cloud Logging sink to export BigQuery data access logs to BigQuery. 2. Perform a BigQuery query on the generated table to extract the information you need. (correct answer)
  • C1. Create a Cloud Logging sink to export BigQuery data access logs to Cloud Storage. 2. Develop a Dataflow pipeline to compute the cost of queries split by users.
  • D1. Activate billing export into BigQuery. 2. Perform a BigQuery query on the billing table to extract the information you need.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: 1. Create a Cloud Logging sink to export BigQuery data access logs to BigQuery. 2. Perform a BigQuery query on the generated table to extract the information you need.

Explanation

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 meets the real-time / low-latency performance requirement.

Topic 1 Β· Question 188

Your company and one of its partners each have a Google Cloud project in separate organizations. Your company's project (prj-a) runs in Virtual Private Cloud (vpc-a). The partner's project (prj-b) runs in vpc-b. There are two instances running on vpc-a and one instance running on vpc-b. Subnets defined in both VPCs are not overlapping. You need to ensure that all instances communicate with each other via internal IPs, minimizing latency and maximizing throughput. What should you do?

  • ASet up a network peering between vpc-a and vpc-b. (correct answer)
  • BSet up a VPN between vpc-a and vpc-b using Cloud VPN.
  • CConfigure IAP TCP forwarding on the instance in vpc-b, and then launch the following gcloud command from one of the instances in vpc-a gcloud: gcloud compute start-iap-tunnel INSTANCE_NAME_IN_VPC_8 22 \ --local-host-port=localhost:22
  • D1. Create an additional instance in vpc-a. 2. Create an additional instance in vpc-b. 3. Install OpenVPN in newly created instances. 4. Configure a VPN tunnel between vpc-a and vpc-b with the help of OpenVPN.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Set up a network peering between vpc-a and vpc-b.

Explanation

A VPC provides a global, software-defined private network for your Google Cloud resources.

Topic 1 Β· Question 189

You want to store critical business information in Cloud Storage buckets. The information is regularly changed, but previous versions need to be referenced on a regular basis. You want to ensure that there is a record of all changes to any information in these buckets. You want to ensure that accidental edits or deletions can be easily rolled back. Which feature should you enable?

  • ABucket Lock
  • BObject Versioning (correct answer)
  • CObject change notification
  • DObject Lifecycle Management
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Object Versioning.

Topic 1 Β· Question 190

You have a Compute Engine application that you want to autoscale when total memory usage exceeds 80%. You have installed the Cloud Monitoring agent and configured the autoscaling policy as follows: β€’ Metric identifier: agent.googleapis.com/memory/percent_used β€’ Filter: metric.label.state = 'used' β€’ Target utilization level: 80 β€’ Target type: GAUGE You observe that the application does not scale under high load. You want to resolve this. What should you do?

  • AChange the Target type to DELTA_PER_MINUTE.
  • BChange the Metric identifier to agent.googleapis.com/memory/bytes_used.
  • CChange the filter to metric.label.state = 'used' AND metric.label.state = 'buffered' AND metric.label.state = 'cached' AND metric.label.state = 'slab'. (correct answer)
  • DChange the filter to metric.label.state = 'free' and the Target utilization to 20.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Change the filter to metric.label.state = 'used' AND metric.label.state = 'buffered' AND metric.label.state = 'cached' AND metric.label.state = 'slab'.

Topic 1 Β· Question 191

You are deploying an application to Google Cloud. The application is part of a system. The application in Google Cloud must communicate over a private network with applications in a non-Google Cloud environment. The expected average throughput is 200 kbps. The business requires: β€’ as close to 100% system availability as possible β€’ cost optimization You need to design the connectivity between the locations to meet the business requirements. What should you provision?

  • AAn HA Cloud VPN gateway connected with two tunnels to an on-premises VPN gateway (correct answer)
  • BTwo Classic Cloud VPN gateways connected to two on-premises VPN gateways Configure each Classic Cloud VPN gateway to have two tunnels, each connected to different on-premises VPN gateways
  • CTwo HA Cloud VPN gateways connected to two on-premises VPN gateways Configure each HA Cloud VPN gateway to have two tunnels, each connected to different on-premises VPN gateways
  • DA single Cloud VPN gateway connected to an on-premises VPN gateway
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: An HA Cloud VPN gateway connected with two tunnels to an on-premises VPN gateway

Explanation

Cloud VPN provides encrypted IPsec connectivity between on premises and a VPC.

Topic 1 Β· Question 192

Your company has an application running on App Engine that allows users to upload music files and share them with other people. You want to allow users to upload files directly into Cloud Storage from their browser session. The payload should not be passed through the backend. What should you do?

  • A1. Set a CORS configuration in the target Cloud Storage bucket where the base URL of the App Engine application is an allowed origin.2. Use the Cloud Storage Signed URL feature to generate a POST URL. (correct answer)
  • B1. Set a CORS configuration in the target Cloud Storage bucket where the base URL of the App Engine application is an allowed origin.2. Assign the Cloud Storage WRITER role to users who upload files.
  • C1. Use the Cloud Storage Signed URL feature to generate a POST URL.2. Use App Engine default credentials to sign requests against Cloud Storage.
  • D1. Assign the Cloud Storage WRITER role to users who upload files.2. Use App Engine default credentials to sign requests against Cloud Storage.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: 1. Set a CORS configuration in the target Cloud Storage bucket where the base URL of the App Engine application is an allowed origin.2. Use the Cloud Storage Signed URL feature to generate a POST URL.

Explanation

App Engine is a fully managed platform that runs and autoscales web apps with little operational effort. Cloud Storage provides durable, scalable object storage that is fully managed.

Topic 1 Β· Question 193

You are configuring the cloud network architecture for a newly created project in Google Cloud that will host applications in Compute Engine. Compute Engine virtual machine instances will be created in two different subnets (sub-a and sub-b) within a single region: β€’ Instances in sub-a will have public IP addresses. β€’ Instances in sub-b will have only private IP addresses. To download updated packages, instances must connect to a public repository outside the boundaries of Google Cloud. You need to allow sub-b to access the external repository. What should you do?

  • AEnable Private Google Access on sub-b.
  • BConfigure Cloud NAT and select sub-b in the NAT mapping section. (correct answer)
  • CConfigure a bastion host instance in sub-a to connect to instances in sub-b.
  • DEnable Identity-Aware Proxy for TCP forwarding for instances in sub-b.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Configure Cloud NAT and select sub-b in the NAT mapping section.

Explanation

Cloud NAT lets private instances reach the internet for outbound traffic without external IPs.

Topic 1 Β· Question 194

Your company is planning to migrate their Windows Server 2022 from their on-premises data center to Google Cloud. You need to bring the licenses that are currently in use in on-premises virtual machines into the target cloud environment. What should you do?

  • A1. Create an image of the on-premises virtual machines and upload into Cloud Storage.2. Import the image as a virtual disk on Compute Engine.
  • B1. Create standard instances on Compute Engine.2. Select as the OS the same Microsoft Windows version that is currently in use in the on-premises environment.
  • C1. Create an image of the on-premises virtual machine.2. Import the image as a virtual disk on Compute Engine.3. Create a standard instance on Compute Engine, selecting as the OS the same Microsoft Windows version that is currently in use in the on-premises environment.4. Attach a data disk that includes data that matches the created image.
  • D1. Create an image of the on-premises virtual machines.2. Import the image as a virtual disk on Compute Engine using --os=windows-2022-dc-v.3. Create a sole-tenancy instance on Compute Engine that uses the imported disk as a boot disk. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: 1. Create an image of the on-premises virtual machines.2. Import the image as a virtual disk on Compute Engine using --os=windows-2022-dc-v.3. Create a sole-tenancy instance on Compute Engine that uses the imported di...

Explanation

Compute Engine provides configurable virtual machines when you need full control of the OS.

Topic 1 Β· Question 195

You are deploying an application to Google Cloud. The application is part of a system. The application in Google Cloud must communicate over a private network with applications in a non-Google Cloud environment. The expected average throughput is 200 kbps. The business requires: β€’ 99.99% system availability β€’ cost optimization You need to design the connectivity between the locations to meet the business requirements. What should you provision?

  • AAn HA Cloud VPN gateway connected with two tunnels to an on-premises VPN gateway. (correct answer)
  • BA Classic Cloud VPN gateway connected with two tunnels to an on-premises VPN gateway.
  • CTwo HA Cloud VPN gateways connected to two on-premises VPN gateways. Configure each HA Cloud VPN gateway to have two tunnels, each connected to different on-premises VPN gateways.
  • DA Classic Cloud VPN gateway connected with one tunnel to an on-premises VPN gateway.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: An HA Cloud VPN gateway connected with two tunnels to an on-premises VPN gateway.

Explanation

Cloud VPN provides encrypted IPsec connectivity between on premises and a VPC.

Topic 1 Β· Question 196

Your company wants to migrate their 10-TB on-premises database export into Cloud Storage. You want to minimize the time it takes to complete this activity and the overall cost. The bandwidth between the on-premises environment and Google Cloud is 1 Gbps. You want to follow Google-recommended practices. What should you do?

  • ADevelop a Dataflow job to read data directly from the database and write it into Cloud Storage.
  • BUse the Data Transfer appliance to perform an offline migration.
  • CUse a commercial partner ETL solution to extract the data from the on-premises database and upload it into Cloud Storage.
  • DUpload the data with gcloud storage cp. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Upload the data with gcloud storage cp.

Explanation

Cloud Storage provides durable, scalable object storage that is fully managed.

Topic 1 Β· Question 197

You are working at a financial institution that stores mortgage loan approval documents on Cloud Storage. Any change to these approval documents must be uploaded as a separate approval file. You need to ensure that these documents cannot be deleted or overwritten for the next 5 years. What should you do?

  • ACreate a retention policy on the bucket for the duration of 5 years. Create a lock on the retention policy. (correct answer)
  • BCreate a retention policy organizational constraint constraints/storage.retentionPolicySeconds at the organization level. Set the duration to 5 years.
  • CUse a customer-managed key for the encryption of the bucket. Rotate the key after 5 years.
  • DCreate a retention policy organizational constraint constraints/storage.retentionPolicySeconds at the project level. Set the duration to 5 years.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Create a retention policy on the bucket for the duration of 5 years. Create a lock on the retention policy.

Topic 1 Β· Question 198

Your company has decided to make a major revision of their API in order to create better experiences for their developers. They need to keep the old version of the API available and deployable, while allowing new customers and testers to try out the new API. They want to keep the same SSL and DNS records in place to serve both APIs. What should they do?

  • AConfigure a new load balancer for the new version of the API
  • BReconfigure old clients to use a new endpoint for the new API
  • CHave the old API forward traffic to the new API based on the path
  • DUse separate backend pools for each API path behind the load balancer (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Use separate backend pools for each API path behind the load balancer

Explanation

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

Topic 1 Β· Question 199

You have a Compute Engine application that you want to autoscale when total memory usage exceeds 80%. You have installed the Cloud Monitoring agent and configured the autoscaling policy as follows: You observe that the application does not scale under high load. You want to resolve this. What should you do?

Exhibit 1 for question 199
  • AChange the Target type to DELTA_PER_MINUTE.
  • BChange the Metric identifier to agent.googleapis.com/memory/bytes_used.
  • CChange the filter to metric.label.state = β€˜used’. (correct answer)
  • DChange the filter to metric.label.state = β€˜free’ and the Target utilization to 20.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Change the filter to metric.label.state = β€˜used’.

Topic 1 Β· Question 200

Your company has a Google Cloud project that uses BigOuery for data warehousing. The VPN tunnel between the on-premises environment and Google Cloud is configured with Cloud VPN. Your security team wants to avoid data exfiltration by malicious insiders, compromised code, and accidental oversharing. What should you do?

  • AConfigure Private Service Connect.
  • BConfigure VPC Service Controls and configure Private Google Access for on-promises hosts. (correct answer)
  • CCreate a service account, grant the BigQuery JobUser role and Storage Object Viewer role to the service account, and remove all other Identity and Access Management (IAM) access from the project.
  • DConfigure Private Google Access.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Configure VPC Service Controls and configure Private Google Access for on-promises hosts.

Explanation

Private Google Access lets internal instances reach Google APIs without external IPs. VPC Service Controls create a security perimeter around managed services to prevent data exfiltration. A VPC provides a global, software-defined private network for your Google Cloud resources.

Showing questions 181–200 of 337 Β· Page 10 of 17