All practice questions
1591 questions
A DevOps engineer needs to safely roll out a new version of a Cloud Run service named `billing-api` in the `us-central1` region by creating a tagged revision, sending a small percentage of test traffic to it, and finally shifting all production traffic to the new revision once verified. Place the following `gcloud` CLI steps in the correct chronological order to complete this canary release workflow.
Drag items to arrange them in the correct order
A DevOps engineer needs to manage an existing Cloud Run service named `inventory-api` deployed in the `us-east1` region. The engineer must route exactly 20% of incoming production traffic to a newly deployed revision tagged `v2` while keeping the remaining 80% on the prior revision. Additionally, the service must be configured so that unauthenticated public requests are blocked. Which TWO actions should the engineer perform using `gcloud` commands or IAM configurations to achieve these requirements?
Select all that apply
An infrastructure engineer is configuring ingress firewall rules for a custom Virtual Private Cloud (VPC) network. Two firewall rules are applied to Compute Engine instances with the network tag `api-server`:
- Rule 1 (`allow-internal-api`): Action: Allow, Protocol/Port: TCP:8080, Source CIDR: `10.1.0.0/16`, Priority: `1000`.
- Rule 2 (`deny-partner-api`): Action: Deny, Protocol/Port: TCP:8080, Source CIDR: `10.1.5.0/24`, Priority: `500`.
A client host at IP address `10.1.5.25` attempts a TCP connection on port 8080 to an `api-server` instance. How will Google Cloud VPC firewall rule evaluation process this traffic request?
A cloud engineer needs to deploy stateless, fault-tolerant Compute Engine virtual machine instances for a batch processing workload using the gcloud CLI. The instances must minimize compute costs and automatically execute a setup script stored in a Google Cloud Storage bucket (gs://my-app-scripts/setup.sh) during boot. Which TWO gcloud compute instances create flag configurations should the engineer use? (Select TWO)
Select all that apply
Your team needs to deploy a dedicated Compute Engine virtual machine instance named prod-api-worker in zone us-east1-b to execute critical database schema migration tasks. To follow security best practices, the VM must run using a non-default, user-managed service account named [email protected] and grant full Google Cloud platform access scopes so IAM roles govern permissions. Which gcloud command should you run to deploy the VM instance according to these requirements?
An Associate Cloud Engineer needs to increase the available disk space for a stateful application running on a Linux Compute Engine VM without restarting or replacing the existing Persistent Disk. Sequence the steps required to safely expand the disk capacity and make the additional storage space usable by the operating system.
Drag items to arrange them in the correct order
An organization manages a critical microservice deployed on Cloud Run named `payment-processor` in the `us-central1` region. Following the deployment of a new revision named `payment-processor-00005-xyz`, Cloud Monitoring metrics reveal a sharp increase in HTTP 500 error rates. The operations team needs to immediately redirect 100% of live incoming production traffic back to the previous stable revision named `payment-processor-00004-abc` without deleting the failed revision so developers can inspect its logs. Which `gcloud` CLI command should the operations team run to execute this rollback?
A cloud engineer needs to deploy an isolated enterprise application environment in Google Cloud using the Google Cloud CLI (`gcloud`). Arrange the administrative steps in the correct operational order to provision the networking infrastructure and deploy the application instance safely.
Drag items to arrange them in the correct order
A Cloud Engineer needs to update an existing global HTTP(S) load balancer configuration on Google Cloud Platform. Specifically, the connection draining duration for a global backend service named `app-backend-service` must be reduced from 300 seconds to 60 seconds to decrease deployment waiting times during instance updates. Which gcloud command should the engineer execute to apply this change?
A company operates a critical processing application deployed on a Managed Instance Group (MIG) in a specific Compute Engine region. During peak traffic hours, autoscaling events fail, and system logs report that the project has reached its maximum regional vCPU threshold. The workload must continue scaling horizontally within the same region to accommodate demand. Which action should an Associate Cloud Engineer take to resolve this capacity constraint?
A cloud operations team is configuring a compute infrastructure on Google Cloud to process stateless, fault-tolerant data transformation tasks. The architecture must minimize compute costs while ensuring high availability and automatic replacement of failed instances. Which TWO management strategies should the team implement? (Select 2 answers)
Select all that apply
A cloud engineer must deploy a Compute Engine virtual machine instance that automatically executes a startup script to read files from a secure Cloud Storage bucket. To ensure least-privilege security, the VM must authenticate using a dedicated custom service account rather than the default Compute Engine service account. Place the operational steps in the correct chronological order required to set up and deploy this VM instance.
Drag items to arrange them in the correct order
An infrastructure engineer needs to update a production web application hosted on a Compute Engine Managed Instance Group (MIG). A new instance template with the updated application image has already been created. The deployment must update the running VM instances gradually without interrupting ongoing user traffic. Which Google-recommended approach should the engineer use to perform this update?
A site reliability engineer needs to optimize a latency-sensitive microservice running on Cloud Run named `telemetry-service` in the `europe-west1` region. To prevent cold starts during peak traffic hours, the service must maintain at least 5 warm container instances at all times, while restricting the upper autoscaling limit to 50 instances to maintain budget boundaries. Which `gcloud` command should be executed to apply these scaling configurations?
An operations team needs to update the network configuration for a custom subnet named `prod-analytics-subnet` located in region `us-east1` within the Virtual Private Cloud (VPC) network `corp-vpc`. The requirements are:
1. Enable VPC Flow Logs on `prod-analytics-subnet` with an aggregation interval set to 5 seconds (`INTERVAL_5_SEC`).
2. Update the existing Cloud NAT service named `nat-config-east` on Cloud Router `nat-router-east` so that `prod-analytics-subnet` is included to provide outbound internet access for private virtual machines using automatically allocated external IP addresses.
Which TWO `gcloud` CLI commands must the team run to satisfy these operational requirements?
Select all that apply
A Cloud Engineer needs to execute a safe canary rollout of a updated container image for an existing Cloud Run service named `order-processor`. Arrange the operational steps in the correct order from first to last to complete the canary deployment and traffic transition without risking immediate full-production downtime.
Drag items to arrange them in the correct order
An operations team is updating telemetry collection for a fleet of Linux Compute Engine virtual machines hosting enterprise applications. The security policy requires collecting system memory (RAM) utilization metrics and ingesting custom application logs into Google Cloud Observability, while strictly adhering to Google-recommended practices and the principle of least privilege. Which TWO actions should the team take to complete this configuration?
Select all that apply
A cloud engineer needs to deploy a new Compute Engine virtual machine instance named analytics-db-tool in zone us-central1-a to host a dedicated database management utility. The business requirements specify that the instance must be placed in a custom subnet named analytics-subnet, assigned the network tag db-client, and explicitly configured to terminate rather than live-migrate during Google Cloud host maintenance events. Which gcloud command should the engineer execute to meet these requirements?
An Associate Cloud Engineer needs to add an additional non-boot persistent disk to an existing Compute Engine Linux VM instance and prepare it for application data storage. What is the correct sequence of steps to provision, attach, and configure this storage resource?
Drag items to arrange them in the correct order
An engineer needs to configure a `gcloud` command to deploy a Compute Engine virtual machine named `batch-processor` in zone `us-central1-a`. The VM must run using a dedicated custom service account named `[email protected]` and must automatically execute a script stored on the local administrative machine named `setup.sh` upon first boot. Which of the following flags must be included in the `gcloud compute instances create` command? (Select TWO correct answers.)
Select all that apply