All practice questions
1591 questions
Your organization is deploying a fault-tolerant batch processing workload on Google Cloud Compute Engine. The operational requirements state that the Virtual Machine (VM) instance must be provisioned using the lowest possible compute cost model, execute an automated initialization script stored in a Cloud Storage bucket at gs://company-scripts-bucket/init.sh upon booting, and run under the identity of a pre-created custom IAM service account named [email protected] with the standard cloud-platform scope. Which gcloud command correctly provisions this VM instance with all required configurations?
A cloud finance specialist is configuring an estimate in the Google Cloud Pricing Calculator for a batch data transformation job running on standard N2 Compute Engine virtual machines. The workload operates predictably for 12 hours every day throughout a 30-day month (360 total hours). When reviewing the baseline cost breakdown, how does the Google Cloud Pricing Calculator apply Sustained Use Discounts (SUDs) to this workload configuration?
A software development team is deploying a batch processing workload that can tolerate unexpected interruptions and resume from saved checkpoints. The team wants to reduce operational costs as much as possible for these fault-tolerant jobs. Which Compute Engine provisioning model should they select when deploying these virtual machines?
An enterprise SaaS platform generates automated database backup archives every night. Engineering teams require high-speed, immediate access to these backup files during the first 30 days to support rapid point-in-time recovery during software release cycles. After 30 days, access is rarely needed (less than once per year), but compliance regulations dictate that all backup files must be retained for 3 years and remain immediately accessible within milliseconds if requested during an audit. Which Cloud Storage configuration meets these requirements while minimizing total cost?
A platform engineering team needs to deploy a high-throughput, fault-tolerant batch processing application to Google Kubernetes Engine (GKE). The application requires custom sysctl kernel parameter tuning and must run on cost-optimized compute resources. Which TWO configuration choices and administrative steps must the team implement to successfully deploy and manage this workload?
Select all that apply
A cloud engineer is configuring a Google Cloud Storage bucket named `media-assets-prod` for a streaming application. Security policies require that access control must be managed uniformly across all objects using Identity and Access Management (IAM) rather than individual object ACLs. Additionally, a service account named `[email protected]` must be granted permission to read objects stored in the bucket using modern `gcloud storage` CLI commands. Which TWO commands should the engineer execute to achieve this configuration? (Select TWO.)
Select all that apply
A senior DevOps engineer is managing a stateless containerized web service deployed on Google Cloud Run in the us-central1 region. The existing service named order-processor currently has all production traffic (100%) routed to revision order-processor-v1. To conduct a canary deployment of a newly built container image, the engineer successfully deploys the new code without shifting live traffic by running gcloud run deploy order-processor --image=gcr.io/corp-apps/order-processor:v2 --region=us-central1 --no-traffic. This deployment generates a new revision named order-processor-v2. The engineer now needs to safely route exactly 20% of incoming live HTTP requests to order-processor-v2 while maintaining the remaining 80% on order-processor-v1. Which gcloud command should the engineer execute to achieve this traffic distribution?
A cloud security administrator at a global freight logistics company needs to authorize a DevOps engineer to link a newly provisioned project, `logistics-telematics-prod`, to the enterprise central Cloud Billing Account (`01A2B3-4C5D6E-7F8990`). The task must adhere strictly to Google Cloud least-privilege guidelines. Place the administrative authorization and CLI execution steps in the correct sequential order required to successfully perform this billing link.
Drag items to arrange them in the correct order
A cloud network administrator is planning to expand the primary IPv4 address range of an existing subnet within a custom-mode Virtual Private Cloud (VPC) network in Google Cloud to support newly required virtual machine instances. Arrange the following steps in the correct chronological order required to safely plan and execute this subnet expansion.
Drag items to arrange them in the correct order
A developer has packaged a microservice into a container image named `gcr.io/my-project/order-service:v1` and needs to deploy it as a fully managed serverless application on Google Cloud. The application must be deployed to the `us-central1` region and allow public unauthenticated HTTP requests. Which `gcloud` command should be used to accomplish this deployment?
A cloud security administrator needs to deploy a new Google Cloud Storage bucket named `gs://secure-partner-intake-data` in the `us-central1` region. Corporate security compliance mandates two strict technical controls upon resource deployment: all uploaded objects must be automatically encrypted using an existing Customer-Managed Encryption Key (CMEK) path (`projects/corp-sec-kms/locations/global/keyRings/finance-kr/cryptoKeys/intake-key`), and Uniform Bucket-Level Access must be enabled immediately to prevent object-level ACL assignments. Which single `gcloud` command correctly provisions this bucket meeting all compliance requirements?
An administrator is deploying a new Cloud SQL database instance using the Google Cloud CLI. Which parameter must be specified in the gcloud command to set the database engine version to MySQL 8.0?
A cloud engineer needs to create a new Google Cloud Storage bucket named `customer-backups-us-central1` located in the `us-central1` region using the modern `gcloud` CLI. The bucket must be configured with a default storage class of `NEARLINE` for storing monthly database backups. Which command should the engineer execute to fulfill these requirements?
An organization is migrating a mixed application portfolio to Google Cloud and needs to model monthly infrastructure expenses accurately using the Google Cloud Pricing Calculator. The architecture consists of:
1. A continuous, non-interruptible web production cluster operating 24 hours a day, 7 days a week.
2. An asynchronous, fault-tolerant batch data transformation processing workload that runs for 4 hours each night.
3. Long-term compliance archive data that is retained indefinitely and accessed less than once per year.
Which of the following configuration options and pricing assumptions should be selected in the Google Cloud Pricing Calculator to model the lowest accurate monthly cost for this architecture? (Select TWO choices.)
Select all that apply
A cloud administrator uses the Google Cloud Pricing Calculator to estimate monthly operational expenses for a custom Compute Engine instance running continuously for 730 hours in a billing month. The instance is configured with vCPUs (billed at per vCPU-hour) and of RAM (billed at per GB-hour). Because the workload runs non-stop, Google Cloud automatically applies a Sustained Use Discount (SUD) of to the combined vCPU and memory compute charges. What is the net estimated monthly compute cost in USD for this instance?
A cloud engineer is configuring an automated script using the Google Cloud CLI (gcloud) to provision worker virtual machines on Compute Engine for batch data processing. The deployment must fulfill three strict technical requirements:
1. The VM instances must be provisioned as Spot VMs to optimize infrastructure cost.
2. The instances must execute a startup script stored in a Cloud Storage bucket at gs://prod-initializer-bucket/setup.sh upon initial boot.
3. The instances must be configured with a user-managed service account named [email protected] without relying on legacy default compute service account permissions.
Which TWO gcloud compute instances create flag options must be included in the command to correctly satisfy these requirements?
Select all that apply
A fintech company is setting up a new Google Cloud project named `payment-clearing-dev` for a team of external contractors. A cloud administrator needs to grant an external contractor the minimum necessary IAM permissions required to link this newly created project to the company's central Cloud Billing Account. The contractor should not have administrative control over the billing account or overall ownership of the project. Following Google Cloud least-privilege best practices, which configuration of roles should be granted to the contractor?
A video streaming platform is implementing an automated ingest workflow in Google Cloud. A DevOps engineer needs to create a new Cloud Storage bucket named `media-raw-uploads-2026` in the `us-central1` region using modern `gcloud storage` CLI tools. The bucket design mandates two strict compliance and operational rules: all access permissions must be managed strictly at the bucket level rather than per-object ACLs, and all uploaded raw video files must automatically transition to Coldline storage 30 days after creation to manage storage expenditure. The lifecycle configuration policy has already been saved locally in a file named `lifecycle.json`. Which TWO commands should the engineer run to provision this bucket according to Google-recommended best practices?
Select all that apply
A DevOps team has provisioned a new regional Google Kubernetes Engine (GKE) cluster named `app-prod-cluster` in the `us-central1` region. A cloud engineer attempts to deploy an application manifest to the cluster by running `kubectl apply -f deployment.yaml` on their workstation, but receives the error: `The connection to the server localhost:8080 was refused`. Which command must the engineer execute to resolve this error?
A system administrator needs to configure a fresh workstation to manage workloads on an existing Google Kubernetes Engine (GKE) Standard cluster named `analytics-prod` located in the `us-central1` region. The administrator has already installed the Google Cloud SDK (`gcloud`) and `kubectl`, and has authenticated using `gcloud auth login`. The application requires applying a Kubernetes deployment manifest named `app-deploy.yaml` and using a dedicated node pool optimized for high-reliability background processing without unexpected node preemption. Which of the following steps are required to achieve this deployment successfully? (Select TWO.)
Select all that apply