πŸ”

PCDOE β€” questions

Page 9 of 11 Β· 210 total questions.

Topic 1 Β· Question 161

You are configuring a CI pipeline. The build step for your CI pipeline integration testing requires access to APIs inside your private VPC network. Your security team requires that you do not expose API traffic publicly. You need to implement a solution that minimizes management overhead. What should you do?

  • AUse Cloud Build private pools to connect to the private VPC. (correct answer)
  • BUse Spinnaker for Google Cloud to connect to the private VPC.
  • CUse Cloud Build as a pipeline runner. Configure Internal HTTP(S) Load Balancing for API access.
  • DUse Cloud Build as a pipeline runner. Configure External HTTP(S) Load Balancing with a Google Cloud Armor policy for API access.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Use Cloud Build private pools to connect to the private VPC.

Explanation

A VPC provides a global, software-defined private network for your Google Cloud resources. Cloud Build runs managed CI pipelines to build, test, and package code.

Topic 1 Β· Question 163

You recently migrated an ecommerce application to Google Cloud. You now need to prepare the application for the upcoming peak traffic season. You want to follow Google-recommended practices. What should you do first to prepare for the busy season?

  • AMigrate the application to Cloud Run, and use autoscaling.
  • BCreate a Terraform configuration for the application's underlying infrastructure to quickly deploy to additional regions.
  • CLoad test the application to profile its performance for scaling. (correct answer)
  • DPre-provision the additional compute power that was used last season, and expect growth.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Load test the application to profile its performance for scaling.

Topic 1 Β· Question 164

You are monitoring a service that uses n2-standard-2 Compute Engine instances that serve large files. Users have reported that downloads are slow. Your Cloud Monitoring dashboard shows that your VMs are running at peak network throughput. You want to improve the network throughput performance. What should you do?

  • AAdd additional network interface controllers (NICs) to your VMs.
  • BDeploy a Cloud NAT gateway and attach the gateway to the subnet of the VMs.
  • CChange the machine type for your VMs to n2-standard-8. (correct answer)
  • DDeploy the Ops Agent to export additional monitoring metrics.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Change the machine type for your VMs to n2-standard-8.

Topic 1 Β· Question 165

Your organization is starting to containerize with Google Cloud. You need a fully managed storage solution for container images and Helm charts. You need to identify a storage solution that has native integration into existing Google Cloud services, including Google Kubernetes Engine (GKE), Cloud Run, VPC Service Controls, and Identity and Access Management (IAM). What should you do?

  • AUse Docker to configure a Cloud Storage driver pointed at the bucket owned by your organization.
  • BConfigure an open source container registry server to run in GKE with a restrictive role-based access control (RBAC) configuration.
  • CConfigure Artifact Registry as an OCI-based container registry for both Helm charts and container images. (correct answer)
  • DConfigure Container Registry as an OCI-based container registry for container images.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Configure Artifact Registry as an OCI-based container registry for both Helm charts and container images.

Explanation

Artifact Registry stores and manages container images and language packages.

Topic 1 Β· Question 166

You need to define SLOs for a high-traffic web application. Customers are currently happy with the application performance and availability. Based on current measurement, the 90th percentile of latency is 160 ms and the 95th percentile of latency is 300 ms over a 28-day window. What latency SLO should you publish?

  • A90th percentile - 150 ms95th percentile - 290 ms
  • B90th percentile - 160 ms95th percentile - 300 ms
  • C90th percentile - 190 ms95th percentile - 330 ms (correct answer)
  • D90th percentile - 300 ms95th percentile - 450 ms
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: 90th percentile - 190 ms95th percentile - 330 ms.

Topic 1 Β· Question 167

Your company runs applications in Google Kubernetes Engine (GKE). Application developers frequently create cloud resources to support their applications. You need to give developers the ability to manage infrastructure as code while adhering to Google-recommended practices. You want to manage infrastructure as code through Kubernetes Custom Resource Definitions (CRDs) and ensure that your chosen setup can be supported by the Google Cloud Support Portal. What should you do?

  • AConfigure Cloud Build with a Terraform builder to execute the terraform plan and terraform apply commands.
  • BInstall and configure Crossplane in GKE.
  • CConfigure a GitHub Action with a Terraform builder to execute the terraform plan and terraform apply commands as part of the pull request process.
  • DInstall and configure Config Connector in GKE. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Install and configure Config Connector in GKE.

Explanation

Google Kubernetes Engine runs managed Kubernetes for containerized, portable workloads.

Topic 1 Β· Question 168

Your company runs services on Google Cloud. Each team runs their applications in a dedicated project. New teams and projects are created regularly. Your security team requires that all logs are processed by a security information and event management (SIEM) system. The SIEM ingests logs by using Pub/Sub. You must ensure that all existing and future logs are scanned by the SIEM. What should you do?

  • ACreate an organization-level aggregated sink with a siem log bucket as the destination. Set an inclusion filter to include all logs.
  • BCreate a folder-level aggregated sink with a siem Pub/Sub topic as the destination. Set an inclusion filter to include all logs. Repeat for each folder.
  • CCreate an organization-level aggregated sink with a siem Pub/Sub topic as the destination. Set an inclusion filter to include all logs. (correct answer)
  • DCreate a project-level logging sink with a siem Pub/Sub topic as the destination. Set an inclusion filter to include all logs. Repeat for each project.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Create an organization-level aggregated sink with a siem Pub/Sub topic as the destination. Set an inclusion filter to include all logs.

Explanation

Pub/Sub is a serverless, global messaging service that decouples services and ingests high-volume event streams.

Topic 1 Β· Question 169

Your company allows teams to self-manage Google Cloud projects, including project-level Identity and Access Management (IAM). You are concerned that the team responsible for the Shared VPC project might accidentally delete the project, so a lien has been placed on the project. You need to design a solution to restrict Shared VPC project deletion to those with the resourcemanager.projects.updateLiens permission at the organization level. What should you do?

  • AInstruct teams to only perform IAM permission management as code with Terraform.
  • BEnable VPC Service Controls for the container.googleapis.com API service.
  • CRevoke the resourcemanager.projects.updateLiens permission from all users associated with the project.
  • DEnable the compute.restrictXpnProjectLienRemoval organization policy constraint. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Enable the compute.restrictXpnProjectLienRemoval organization policy constraint.

Explanation

Organization Policy sets guardrails that constrain how resources can be configured across the org.

Topic 1 Β· Question 170

Your company runs an ecommerce business. The application responsible for payment processing has structured JSON logging with the following schema: Capture and access of logs from the payment processing application is mandatory for operations, but the jsonPayload.user_email field contains personally identifiable information (PII). Your security team does not want the entire engineering team to have access to PII. You need to stop exposing PII to the engineering team and restrict access to security team members only. What should you do?

Exhibit 1 for question 170
  • AApply the conditional role binding resource.name.extract("locations/global/buckets/{bucket}/") == "_Default" to the _Default bucket.
  • BApply a jsonPayload.user_email restricted field to the _Default bucket. Grant the Log Field Accessor role to the security team members. (correct answer)
  • CApply a jsonPayload.user_email exclusion filter to the _Default bucket.
  • DModify the application to toggle inclusion of user_email when the LOG_USER_EMAIL environment variable is set to true. Restrict the engineering team members who can change the production environment variable by using the CODEOWNERS file.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Apply a jsonPayload.user_email restricted field to the _Default bucket. Grant the Log Field Accessor role to the security team members.

Topic 1 Β· Question 171

Your organization is running multiple Google Kubernetes Engine (GKE) clusters in a project. You need to design a highly-available solution to collect and query both domain-specific workload metrics and GKE default metrics across all clusters, while minimizing operational overhead. What should you do?

  • AUse Prometheus operator to install Prometheus in every cluster and scrape the metrics. Configure remote-write to one central Prometheus. Query the central Prometheus instance.
  • BEnable managed collection on every GKE cluster. Query the metrics in BigQuery.
  • CUse Prometheus operator to install Prometheus in every cluster and scrape the metrics. Ensure that a Thanos sidecar is enabled on every Prometheus instance. Configure Thanos in the central cluster. Query the central Thanos instance.
  • DEnable managed collection on every GKE cluster. Query the metrics in Cloud Monitoring. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Enable managed collection on every GKE cluster. Query the metrics in Cloud Monitoring.

Explanation

Google Kubernetes Engine runs managed Kubernetes for containerized, portable workloads. Cloud Monitoring collects metrics, dashboards, and alerts to observe system health.

Topic 1 Β· Question 172

Your company stores a large volume of infrequently used data in Cloud Storage. The projects in your company's CustomerService folder access Cloud Storage frequently, but store very little data. You want to enable Data Access audit logging across the company to identify data usage patterns. You need to exclude the CustomerService folder projects from Data Access audit logging. What should you do?

  • AEnable Data Access audit logging for Cloud Storage at the organization level, and configure exempted principals to include users of the CustomerService folder.
  • BEnable Data Access audit logging for Cloud Storage at the organization level, with no additional configuration.
  • CEnable Data Access audit logging for Cloud Storage for all projects and folders other than the CustomerService folder. (correct answer)
  • DEnable Data Access audit logging for Cloud Storage for all projects and folders, and configure exempted principals to include users of the CustomerService folder.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Enable Data Access audit logging for Cloud Storage for all projects and folders other than the CustomerService folder.

Explanation

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

Topic 1 Β· Question 173

You have an application running in production on Cloud Run. Your team recently finished developing a new version (revision B) of the application. You want to test the new revision on 10% of your clients by using the least amount of effort. What should you do?

  • ADeploy the new revision to the existing service without traffic allocated. Tag the revision and share the URL with 10% of your clients.
  • BCreate a new service, and deploy the new revisions on the new service. Deploy a new revision of the old application where the application routes a percentage of the traffic to the new service.
  • CCreate a new service, and deploy the new revision on that new service. Create a load balancer to split the traffic between the old service and the new service.
  • DDeploy the new revision to the existing service without traffic allocated. Split the traffic between the old revision and the new revision. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Deploy the new revision to the existing service without traffic allocated. Split the traffic between the old revision and the new revision.

Topic 1 Β· Question 174

You are designing a new multi-tenant Google Kubernetes Engine (GKE) cluster for a customer. Your customer is concerned with the risks associated with long-lived credentials use. The customer requires that each GKE workload has the minimum Identity and Access Management (IAM) permissions set following the principle of least privilege (PoLP). You need to design an IAM impersonation solution while following Google-recommended practices. What should you do?

  • A1. Create a Google service account.2. Create a node pool, and set the Google service account as the default identity.3. Ensure that workloads can only run on the designated node pool by using node selectors, taints, and tolerations.4. Repeat for each workload.
  • B1. Create a Google service account.2. Create a node pool without taints, and set the Google service account as the default identity.3. Grant IAM permissions to the Google service account.
  • C1. Create a Google service account.2. Create a Kubernetes service account in a Workload Identity-enabled cluster.3. Link the Google service account with the Kubernetes service account by using the roles/iam.workloadIdentityUser role and iam.gke.io/gcp-service-account annotation.4. Map the Kubernetes service account to the workload.5. Repeat for each workload. (correct answer)
  • D1. Create a Google service account.2. Create a service account key for the Google service account.3. Create a Kubernetes secret with a service account key.4. Ensure that workload mounts the secret and set the GOOGLE_APPLICATION_CREDENTIALS environment variable to point at the mount path.5. Repeat for each workload.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: 1. Create a Google service account.2. Create a Kubernetes service account in a Workload Identity-enabled cluster.3. Link the Google service account with the Kubernetes service account by using the roles/iam.workloadId...

Explanation

Google Kubernetes Engine runs managed Kubernetes for containerized, portable workloads. Workload Identity Federation lets workloads access Google Cloud without long-lived service account keys. A service account provides an identity for workloads to access Google Cloud APIs securely.

Topic 1 Β· Question 175

You are configuring a Cl pipeline in Cloud Build When you test the pipeline, the following cloudbuild.yaml definition results in 5 minutes each on the foo step and bar step The foo step and bar step are independent of each other. The baz step needs both the foo and bar steps to be completed before starting. You want to use parallelism to reduce build times What should you do?

Exhibit 1 for question 175
  • AModify the build script to add -options:machineType: 'E2_HIGHCPU_8'
  • BModify the build script to add -options:machineType: 'E2_HIGHCPU_32'
  • CChange the build script to:
  • DChange the build script to: (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Change the build script to:.

Topic 1 Β· Question 176

You receive a Cloud Monitoring alert indicating potential malicious activity on a node in your Google Kubernetes Engine (GKE) cluster. The alert suggests a possible compromised container running on that node. You need to isolate this node to prevent further compromise while investigating the issue. You also want to minimize disruption to applications running on the cluster. What should you do?

  • ATaint the suspicious node to prevent Pods that have interacted with it from being scheduled on other nodes in the cluster
  • BScale down the deployment associated with the compromised container to zero other nodes
  • CRestart the node to disrupt the malicious activity, and force all Pods to be restructured on other nodes.
  • DCordon the node to prevent new Pods from being scheduled, the drain the node to safely remove existing Pods and reschedule them to other nodes. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Cordon the node to prevent new Pods from being scheduled, the drain the node to safely remove existing Pods and reschedule them to other nodes.

Topic 1 Β· Question 177

Your company has an application deployed on Google Kubernetes Engine (GKE) consisting of 12 microservices. Multiple teams are working concurrently on various features across three envi-ronments: Dev, Staging, and Prod. Developers report dependency test failures and delayed re-leases due to deployments from multiple feature branches in the shared Dev GKE cluster. You need to implement a cost-effective solution for developers to test their microservice features in a stable development environment isolated from other development activities. What should you do?

  • AAutomate CI pipelines by using Cloud Build for container image creation and Kubernetes manifest updates from main branch merge requests. Integrate with Config Sync to test new im-ages in dynamically created namespaces on the Dev GKE cluster with autoscaling enabled. Im-plement a post-test namespace cleanup routine.
  • BAutomate CI pipelines by using Cloud Build to create container images and update Kuber-netes manifests for each commit. Use Cloud Deploy for progressive delivery to Dev, Staging, and Prod GKE clusters. Enable Config Sync for consistent Kubernetes configurations across en-vironments.
  • CUse Cloud Build to automate CI pipelines and update Kubernetes manifest files from feature branch commits. Integrate with Config Sync to test new images in dynamically created namespaces on the Dev GKE cluster with autoscaling enabled. Implement a post-test namespace cleanup routine. (correct answer)
  • DUse Cloud Build to automate CI pipelines and update Kubernetes manifest files from feature branch commits. Integrate with Config Sync to test new images in dynamically created GKE Dev clusters for each feature branch, which are deleted upon merge request.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Use Cloud Build to automate CI pipelines and update Kubernetes manifest files from feature branch commits. Integrate with Config Sync to test new images in dynamically created namespaces on the Dev GKE cluster with au...

Explanation

Google Kubernetes Engine runs managed Kubernetes for containerized, portable workloads. Cloud Build runs managed CI pipelines to build, test, and package code. This option delivers the requirement at the lowest cost.

Topic 1 Β· Question 178

You are troubleshooting a failed deployment in your CI/CD pipeline. The deployment logs indicate that the application container failed to start due to a missing environment variable. You need to identify the root cause and implement a solution within your CI/CD workflow to prevent this issue from recurring. What should you do?

  • AUse a canary deployment strategy.
  • BImplement static code analysis in the CI pipeline.
  • CRun integration tests in the CI pipeline. (correct answer)
  • DEnable Cloud Audit Logs for the deployment.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Run integration tests in the CI pipeline.

Topic 1 Β· Question 179

You work for a company that offers a free photo processing application. You are designing the infrastructure for the backend service that processes the photos. The service: β€’ Uses Cloud Storage to store both unprocessed and processed photos. β€’ Can resume processing photos in the event of a failure. β€’ Is not suitable for containerization. There is no SLO for the time taken to process a photo. You need to choose the most cost-effective solution for running the service. What should you do?

  • ADeploy the service by using Cloud Run.
  • BDeploy the service by using standard VMs with a 3-year committed use discount.
  • CDeploy the service by using GKE.
  • DDeploy the service by using Spot VMs. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Deploy the service by using Spot VMs.

Explanation

Spot VMs use spare capacity at a large discount for fault-tolerant, interruptible workloads. This option delivers the requirement at the lowest cost.

Topic 1 Β· Question 180

You manage a critical API running on Cloud Run that serves an average of 10,000 requests per minute. You need to define service level objectives (SLOs) for availability and latency to ensure that the API meets user expectations, which include 99.9% availability and a maximum latency of 200 milliseconds for 95% of requests. You also need to ensure these SLOs are actively monitored and measured. What should you do?

  • AConfigure Cloud Monitoring to send alerts when average API latency exceeds 150 ms or the error rate surpasses 0.1%.
  • BPrioritize latency as the only SLO, targeting 100 ms for 99% of requests.
  • CSet SLOs for 99% availability at 99% and 500 ms latency for 90% of requests. Use Cloud Monitoring to track SLOs and alert on violations.
  • DSet SLOs for the API by using availability and latency service level indicators. Use Cloud Monitoring to track SLOs and alert on violations. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Set SLOs for the API by using availability and latency service level indicators. Use Cloud Monitoring to track SLOs and alert on violations.

Explanation

Cloud Monitoring collects metrics, dashboards, and alerts to observe system health. This option meets the real-time / low-latency performance requirement.

Topic 1 Β· Question 181

You are running a web application that connects to an AlloyDB cluster by using a private IP address in your default VPC. You need to run a database schema migration in your CI/CD pipeline by using Cloud Build before deploying a new version of your application. You want to follow Google-recommended security practices. What should you do?

  • ASet up a Cloud Build private pool to access the database through a static external IP address. Configure the database to only allow connections from this IP address. Execute the schema migration script in the private pool.
  • BCreate a service account that has permission to access the database. Configure Cloud Build to use this service account and execute the schema migration script in a private pool. (correct answer)
  • CAdd the database username and password to Secret Manager. When running the schema migration script, retrieve the username and password from Secret Manager.
  • DAdd the database username and encrypted password to the application configuration file. Use these credentials in Cloud Build to execute the schema migration script.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Create a service account that has permission to access the database. Configure Cloud Build to use this service account and execute the schema migration script in a private pool.

Explanation

A service account provides an identity for workloads to access Google Cloud APIs securely. Cloud Build runs managed CI pipelines to build, test, and package code.

Showing questions 161–180 of 210 Β· Page 9 of 11