All practice questions
1591 questions
Your organization maintains a central Cloud DNS private zone named `corp.internal` that was initially associated with a Virtual Private Cloud (VPC) network named `mgmt-vpc`. You have created a new application network named `prod-vpc` within the same Google Cloud project. Virtual machines in `prod-vpc` need to resolve private domain names defined in `corp.internal` without exposing the DNS zone publicly or deploying dedicated proxy virtual machines. Which TWO actions must you perform to allow VMs in `prod-vpc` to resolve private hostnames in `corp.internal`? (Select TWO.)
Select all that apply
A mobile gaming software development team stores daily automated crash log bundles in a Google Cloud Storage bucket. Developers frequently inspect and analyze these crash logs during the first 14 days following an application release. After 14 days, the logs are rarely accessed, but company compliance requires preserving them for 365 days before permanent deletion. The team wants to minimize storage and access costs without manual administration. Which bucket configuration should you implement?
A DevOps engineer at an e-commerce platform needs to create a new Google Cloud Storage bucket in the europe-west3 region to archive generated end-of-day customer invoice documents. The documents are accessed occasionally during the first 30 days after generation and must have access rights controlled strictly via IAM permissions across the entire bucket, preventing any individual object-level ACL assignments. Which gcloud CLI command meets these requirements using current Google Cloud recommended practices?
A cloud engineer has prepared a set of Terraform configuration files to provision Google Cloud infrastructure. Before applying any changes to the environment, the engineer wants to preview the execution plan and verify which resources will be created or modified. Which command should the cloud engineer run?
A DevOps team needs to set up a Google Cloud Storage bucket named `iot-log-repository` in the `europe-west1` region to hold daily application logs. The team has prepared a local configuration file named `lifecycle.json` containing lifecycle rules to transition objects to Nearline storage after 30 days and delete them after 365 days. Which set of commands represents the Google-recommended approach using the modern Google Cloud CLI to provision the bucket and apply this lifecycle policy?
A Cloud Engineer is tasked with bringing an existing, manually created Compute Engine VM instance named `legacy-app-vm` under Terraform management. The infrastructure state must be maintained in a remote Google Cloud Storage (GCS) backend. In what sequence should the engineer execute the following steps to safely import the VM instance without causing resource recreation or downtime?
Drag items to arrange them in the correct order
An organization runs a production application on an existing Standard Google Kubernetes Engine (GKE) cluster. The data science team needs to deploy a batch data processing job that is stateless, fault-tolerant, and designed to handle sudden instance terminations gracefully. To minimize compute expenses, management requests running this batch job on cost-optimized infrastructure without risking the availability of existing critical stateful workloads running on standard nodes. Which deployment strategy should the Cloud Engineer execute to satisfy these requirements?
A developer packaged a Node.js REST API into a container image where the application server strictly listens on internal TCP port 8000 without reading the PORT environment variable. When deploying this container image to Google Cloud Run using the standard gcloud CLI command, deployment fails because startup health checks time out. How should the developer configure the deployment to successfully serve traffic on Cloud Run without modifying the application source code?
A cloud engineer manages a production Google Kubernetes Engine (GKE) Standard cluster hosting both latency-sensitive microservices and fault-tolerant background batch workloads. To reduce compute expenditures, the engineer needs to provision a secondary node pool using GCP Spot VMs for the batch workloads. The implementation must ensure that Cluster Autoscaler dynamically adjusts node counts based on pending pod demand, while strictly preventing latency-sensitive web pods from being scheduled onto Spot instances. Which strategy correctly configures the GKE node pool and workload specifications to satisfy these requirements?
A cloud engineer needs to deploy a Compute Engine virtual machine instance that automatically executes a bash initialization script stored in a private Cloud Storage bucket upon booting. The VM must adhere to the principle of least privilege using a custom service account. Arrange the required administrative steps in the correct chronological sequence from first to last.
Drag items to arrange them in the correct order
A DevOps engineer needs to prevent unexpected cost overruns in a development environment. The engineering lead requests that when monthly spend reaches $5,000, all non-essential Compute Engine instances in the project must immediately stop. The engineer plans to configure a Cloud Billing budget threshold at 100%. Which configuration approach will achieve this automated outcome?
A system administrator is managing a web application running on a Google Kubernetes Engine (GKE) cluster. The administrator needs to ensure that the number of running Pod replicas automatically increases when application CPU utilization rises and scales down when traffic drops. Which GKE or Kubernetes feature should the administrator configure?
An infrastructure engineer manages a Google Kubernetes Engine (GKE) Standard cluster hosting a memory-intensive data processing workload in a node pool named `analytics-pool`. The current nodes using `e2-standard-4` machine types are consistently running out of memory. The engineer must upgrade `analytics-pool` to use `e2-standard-8` machine types with minimal disruption to running pods. Which operational procedure should the engineer perform?
A cloud engineer needs to deploy a custom Virtual Private Cloud (VPC) infrastructure in Google Cloud to host secure internal applications. The requirements specify creating a VPC network without automatic subnet creation, provisioning a regional subnet, launching a Compute Engine VM with a specific network tag in that subnet, and enforcing an ingress firewall rule that allows SSH traffic (TCP port 22) exclusively to instances carrying that network tag. In what order should the engineer execute the following `gcloud` CLI commands to ensure all resource dependencies are satisfied without errors?
Drag items to arrange them in the correct order
An enterprise operations team requires access to inspect Cloud Logging logs and view Cloud Monitoring metrics for resources in a specific project without permission to modify infrastructure or view underlying application datasets. To adhere to Google Cloud best practices for least privilege, which TWO predefined IAM roles should you grant to the operations team members? (Select TWO.)
Select all that apply
A financial company is designing the network architecture for an internal analytics microservice hosted on Compute Engine instances across multiple subnets within a single Google Cloud region. The service receives HTTPS traffic strictly from other internal VPC workloads and on-premises hosts connected via Dedicated Interconnect. The architecture requires Layer 7 path-based request routing and internal SSL/TLS termination without allocating any public IP addresses. Which load balancer type should you plan to implement?
You are deploying a Global External Application Load Balancer to serve HTTPS traffic for a web application. You have already created a Google-managed SSL certificate and a URL map for your domain. Which action must you perform next to finish configuring the load balancer frontend?
Your organization is deploying an internal microservices application in Google Cloud VPC network `prod-vpc`. The application backend runs on Compute Engine instances in region `us-central1`. You need to set up a Regional Internal HTTP(S) Load Balancer to distribute internal HTTP traffic across your backend instances, and enable internal clients to reach the service using the domain name `app.internal.corp`. Which TWO configuration actions must you perform? (Select TWO.)
Select all that apply
A Cloud Engineer is initializing a new infrastructure environment on Google Cloud using Terraform. The working directory contains valid `.tf` configuration files. What is the correct chronological sequence of Terraform CLI commands to initialize the working directory, preview proposed infrastructure changes, provision the GCP resources, and finally decommission the resources when no longer needed?
Drag items to arrange them in the correct order
A cloud engineer is utilizing the Google Cloud Pricing Calculator to model monthly infrastructure costs for a baseline web service running continuous workloads on five `n2-standard-4` Compute Engine virtual machines in the `us-central1` region. The organization plans to run this workload uninterrupted for the next three years. Which configuration approach in the Pricing Calculator will yield the most accurate and cost-effective monthly estimate for these instances?