All practice questions

1591 questions

Question 881Question

A Cloud Engineer needs to update an existing Compute Engine Managed Instance Group (MIG) to use a new VM configuration. In which sequence should the engineer execute the administrative steps to perform a zero-downtime rolling update?

Drag items to arrange them in the correct order

Show answer & explanation

Answer

The correct sequence to perform a rolling update on a Managed Instance Group is: 1) Create a new instance template, 2) Update the Managed Instance Group to point to the new template, 3) Initiate a rolling update on the group, and 4) Monitor the update process until completion.
Updating a Managed Instance Group with new software or configurations requires creating a new immutable instance template first. Once the template is created, the Managed Instance Group must be updated to reference the new template. Initiating a rolling update then systematically replaces existing running instances with new instances built from the updated template. Finally, monitoring confirms all instances are successfully updated and passing health checks.

Step-by-Step Solution

1
Create the new instance template
A new Compute Engine instance template resource with the required updates is provisioned in Google Cloud.
Compute Engine Managed Instance Groups rely on immutable templates; any change requires defining a new template.
2
Assign the template to the Managed Instance Group
The target instance template property of the Managed Instance Group is updated.
The group configuration must be updated to specify which template should be used for replacement VMs.
3
Initiate the rolling update
Compute Engine starts replacing existing VM instances with instances created from the new template.
Changing the target template does not automatically replace existing instances; an explicit rolling update must be initiated.
4
Monitor rollout progress
All instances in the group transition to the new version and pass health checks.
Monitoring verifies that the update completed successfully without causing service failure.

Key Concept

Compute Engine Managed Instance Group Rolling Updates
Estimated Time:1m 0s
Question 882Question

An enterprise operations team is managing a mission-critical containerized microservice named `payment-service` deployed on Cloud Run. Security policy mandates two strict operational requirements:
1. The service must block direct public internet access and only accept inbound requests routed through an internal Application Load Balancer or internal VPC resources.
2. All outbound requests made by container instances to external third-party payment gateways must egress through a static, reserved IP address using a Cloud NAT instance attached to the company's Virtual Private Cloud (VPC).

Which TWO configuration settings or `gcloud run services update` command flags must be configured on the Cloud Run resource to meet these security requirements? (Select TWO.)

Select all that apply

Show answer & explanation

Answer: Configure `--ingress=internal-and-cloud-load-balancing` on the Cloud Run service.; Configure `--vpc-egress=all-traffic` alongside a VPC connector or Direct VPC egress.

Answer

To meet the security requirements, you must restrict inbound traffic using `--ingress=internal-and-cloud-load-balancing` and force all outbound container traffic through the VPC using `--vpc-egress=all-traffic`.
The requirement to block direct internet traffic while accepting load-balanced traffic is satisfied by configuring `--ingress=internal-and-cloud-load-balancing`. The requirement to send outbound external requests through a Cloud NAT static IP is satisfied by attaching a VPC network interface (VPC Access Connector or Direct VPC egress) and specifying `--vpc-egress=all-traffic`.

Step-by-Step Solution

1
Analyze Ingress Requirements
To block direct public access while allowing traffic from an internal/external Cloud Load Balancer and internal VPC endpoints, Cloud Run ingress must be set to `internal-and-cloud-load-balancing`.
The default setting `all` allows direct traffic to the service's default URL, whereas `internal` blocks Cloud Load Balancing unless specifically routed internally.
2
Analyze Outbound Egress & Cloud NAT Requirements
To route outbound calls destined for external third-party payment gateways through a static IP address via Cloud NAT, all egress traffic must pass through a VPC network connector.
By default, Cloud Run egress routes public IP traffic directly out to the internet via shared GCP IP pools. Setting `--vpc-egress=all-traffic` overrides this behavior so that outbound internet calls pass through the designated VPC subnet and hit the Cloud NAT gateway.

Key Concept

Cloud Run Networking Controls: Ingress Policies and VPC Egress Routing
Question 883Question

Your production Cloud SQL for PostgreSQL database instance is experiencing high CPU utilization caused by heavy analytical reporting queries. You need to offload this read-only query workload from the primary database instance with minimal operational effort. What should you do?

Show answer & explanation

Answer: Create a Cloud SQL read replica and route the analytical reporting queries to the replica instance.

Answer

Create a Cloud SQL read replica and route the analytical reporting queries to the replica instance.
Creating a Cloud SQL read replica provides a read-only copy of the primary database. Directing heavy analytical reporting queries to the read replica offloads CPU consumption from the primary instance with minimal operational effort.

Step-by-Step Solution

1
Identify the performance bottleneck on the primary Cloud SQL instance.
Heavy read-only analytical queries are consuming CPU resources on the primary database.
Separating read workloads from write operations reduces resource contention on the primary instance.
2
Select the appropriate Cloud SQL feature to scale read operations.
Deploy a Cloud SQL read replica in the same or another region.
Cloud SQL read replicas replicate data asynchronously from the primary instance and serve read-only queries.
3
Configure the reporting application to connect to the replica.
Reporting queries are directed to the read replica's IP address.
This offloads read traffic from the primary instance with minimal configuration overhead.

Key Concept

Cloud SQL Read Replicas for Read Scaling
Estimated Time:1m 0s
Question 884Question

A DevOps engineering team is designing the network architecture for an internal real-time metrics ingestion service hosted on Compute Engine instances across multiple zones within a single region. The service receives incoming data via a custom raw TCP protocol on port 9090. The backend instances must receive the original client IP addresses to perform IP-based rate limiting and logging. All client traffic originates from within the internal Virtual Private Cloud (VPC). Which Google Cloud load balancer should you choose for this workload?

Show answer & explanation

Answer: Internal Passthrough Network Load Balancer

Answer

Internal Passthrough Network Load Balancer
An Internal Passthrough Network Load Balancer is a Layer 4 regional load balancer that routes internal VPC TCP/UDP traffic directly to backend instances without proxying, preserving the original client source IP address.

Step-by-Step Solution

1
Identify the network scope and traffic origin requirement.
Traffic originates strictly from within the internal VPC.
Internal VPC communication requires an internal load balancing service rather than an external load balancer.
2
Identify protocol requirements at Layer 4 versus Layer 7.
The service uses a non-HTTP raw TCP protocol on custom port 9090.
Application load balancers operate at Layer 7 for HTTP/HTTPS workloads, whereas Network load balancers operate at Layer 4 for arbitrary TCP/UDP traffic.
3
Verify client IP preservation capability.
Backend instances require the original client source IP address preserved directly in packet headers.
Passthrough load balancers deliver packets directly to backend instances without proxying or translating the source IP address.

Key Concept

Selecting GCP Load Balancers based on Traffic Scope, Protocol, and Client IP Preservation
Estimated Time:1m 30s
Question 885Question

An organization needs to configure IAM permissions for an automated monitoring service account. The service account must be able to read log entries in Cloud Logging for a specific project and upload generated report files into a designated Cloud Storage bucket, without being able to read or modify existing files in that bucket. Adhering strictly to Google Cloud's principle of least privilege, which TWO role assignments should be granted? (Select TWO.)

Select all that apply

Show answer & explanation

Answer: Grant the Logs Viewer role (roles/logging.viewer) to the service account at the project level.; Grant the Storage Object Creator role (roles/storage.objectCreator) to the service account on the specific Cloud Storage bucket.

Answer

Granting the Logs Viewer role (roles/logging.viewer) at the project level and the Storage Object Creator role (roles/storage.objectCreator) on the target Cloud Storage bucket.
To fulfill the principle of least privilege, specific predefined roles should be assigned at the narrowest appropriate resource level. Assigning the Logs Viewer role (roles/logging.viewer) at the project level grants read access to log entries without broader management rights. Assigning the Storage Object Creator role (roles/storage.objectCreator) on the specific Cloud Storage bucket allows uploading report files without permitting object deletion or viewing existing data.

Step-by-Step Solution

1
Analyze access requirements for reading Cloud Logging logs.
The service account requires read access to project logs, which is directly satisfied by the predefined Logs Viewer role (roles/logging.viewer).
Granting roles/logging.viewer at the project level provides necessary read permissions for log entries while preventing unintended configuration changes.
2
Analyze access requirements for uploading report files to Cloud Storage.
The service account only needs to upload new files without reading or deleting existing objects.
Granting the Storage Object Creator role (roles/storage.objectCreator) directly on the target bucket resource restricts actions exclusively to creating new objects.
3
Evaluate distractor options against Google Cloud IAM best practices.
Broad primitive roles and organization-level role grants violate least privilege and hierarchy inheritance principles.
Primitive roles grant excessive privileges across project services, and inherited permissions from parent hierarchy levels cannot be restricted by downstream policies.

Key Concept

Managing least-privilege predefined IAM roles at appropriate resource hierarchy levels
Question 886Question

An organization is planning the storage architecture for an enterprise application running on Compute Engine virtual machines. The workload has two distinct operational requirements:

1. A fully managed relational database that supports standard SQL and ACID transactions with automatic regional High Availability (HA) failover.
2. Extremely high-throughput, low-latency ephemeral scratch space attached directly to individual VM instances for temporary cache calculations, where data persistence after instance termination is not required.

Which TWO database and storage options should the Cloud Engineer select to satisfy these requirements? (Select TWO.)

Select all that apply

Show answer & explanation

Answer: Provision Cloud SQL configured with High Availability (regional deployment); Attach Local SSD storage to the Compute Engine instances for temporary scratch space

Answer

The correct selections are Cloud SQL configured with High Availability (regional deployment) and Local SSD storage attached to the Compute Engine instances.
Cloud SQL with High Availability fulfills the relational SQL transaction requirement with regional automatic failover across zones. Local SSD provides physically attached block storage with maximum IOPS and lowest latency, ideal for ephemeral scratch processing where persistent disk durability is not required.

Step-by-Step Solution

1
Evaluate requirement 1: Relational SQL database with regional High Availability.
Cloud SQL provides standard relational database engines (PostgreSQL, MySQL, SQL Server) with built-in regional HA failover capability across zones.
Cloud SQL matches all requirements for managed relational SQL storage with High Availability.
2
Evaluate requirement 2: Ultra-fast ephemeral scratch space attached directly to VM instances.
Local SSDs are physically attached to the server host, delivering microsecond-level latency and high IOPS for non-persistent scratch data.
Local SSDs provide maximum performance for temporary caching/scratch space where data does not need to survive instance termination.

Key Concept

Selecting GCP Database and Block Storage Solutions Based on Workload Requirements
Question 887Question

An enterprise database team plans to execute a long-running, non-fault-tolerant database schema migration on Google Cloud Compute Engine. The job requires 12 hours of uninterrupted processing and cannot withstand instance termination or preemption mid-execution. Additionally, administrative access for the operational team responsible for starting, stopping, and maintaining these instances must adhere strictly to the principle of least privilege. Which configuration strategy should the Cloud Engineer implement to meet these requirements following Google-recommended best practices?

Show answer & explanation

Answer: Provision the workload using standard (non-Spot) Compute Engine VM instances, and assign the administrative team the predefined Compute Instance Admin (v1) role (roles/compute.instanceAdmin.v1) on the target project.

Answer

Provision the workload using standard (non-Spot) Compute Engine VM instances, and assign the administrative team the predefined Compute Instance Admin (v1) role (roles/compute.instanceAdmin.v1) on the target project.
Standard Compute Engine VM instances guarantee uninterrupted execution required for non-fault-tolerant, long-running database migrations. Pairing standard instances with the predefined Compute Instance Admin (v1) role (`roles/compute.instanceAdmin.v1`) ensures that operators possess all necessary instance management permissions without exposing unrelated project services.

Step-by-Step Solution

1
Analyze workload tolerance for interruption.
Identified that the 12-hour database migration is non-fault-tolerant and cannot handle termination, ruling out Spot or Preemptible VMs.
Spot/Preemptible instances offer cost savings but carry a risk of preemption at any moment with only 30 seconds notification.
2
Determine instance lifecycle provision mode.
Select standard Compute Engine virtual machine instances to guarantee compute capacity and continuous runtime.
Standard instances guarantee process continuity without premature preemption.
3
Evaluate access control requirements based on least privilege.
Select predefined role `roles/compute.instanceAdmin.v1` instead of broad primitive roles like Editor or Owner.
Predefined Compute Engine roles restrict permissions specifically to Compute Engine resources, avoiding excessive permissions across other GCP services.

Key Concept

Compute Engine Lifecycle Management and IAM Least Privilege
Estimated Time:2m 0s
Question 888Question

A cloud administrator needs to securely provision a Compute Engine virtual machine instance that uses a Customer-Managed Encryption Key (CMEK) for its boot disk and runs a startup script retrieved from a private Cloud Storage bucket. In what sequence should the administrator execute the administrative tasks to ensure successful VM provisioning and execution under least privilege?

Drag items to arrange them in the correct order

Show answer & explanation

Answer

The correct deployment sequence is: 1) Grant the Compute Engine Service Agent the Cloud KMS Encrypter/Decrypter role. 2) Create a custom service account and assign Storage Object Viewer access to the bucket. 3) Upload the script to the private Cloud Storage bucket. 4) Run 'gcloud compute instances create' passing the CMEK key, custom service account, cloud-platform scope, and metadata URL. 5) Inspect serial port output to verify startup script completion.
The proper administrative workflow follows a logical dependency chain: Infrastructure access permissions must be granted to the service agent for CMEK disk creation first. Next, identity and access for the application payload must be established by creating a dedicated service account and granting storage read access. The payload (startup script) is then uploaded to Cloud Storage. Once prerequisites are in place, the VM instance is created with gcloud referencing the KMS key, service account, and metadata URL. Finally, serial console logs are reviewed to confirm startup script execution.

Step-by-Step Solution

1
Configure KMS access for Compute Engine
Compute Engine service agent gains cryptoKeyEncrypterDecrypter privileges on the specified Cloud KMS key.
Before Google Cloud can create disks encrypted with CMEK, the Google-managed Compute Engine Service Agent must have explicit permission to encrypt and decrypt using the specified KMS key.
2
Configure VM identity and storage permissions
Custom service account is created and granted roles/storage.objectViewer on the target bucket.
The VM instance needs identity credentials capable of downloading objects from the private Cloud Storage bucket.
3
Stage the startup script
Script file is uploaded and accessible at a gs:// URL.
The artifact must exist in Cloud Storage prior to VM creation so the metadata URL points to a valid file.
4
Provision the Compute Engine VM instance
VM instance is created with an encrypted CMEK boot disk and assigned identity.
The gcloud compute instances create command ties together the KMS key, service account, cloud-platform access scope, and startup-script-url metadata.
5
Validate deployment
Startup script logs are verified via serial console output.
Checking serial port 1 output allows administrators to confirm the startup script successfully downloaded and executed without errors.

Key Concept

Compute Engine CMEK disk encryption and secure startup script provisioning sequence
Question 889Question

A DevOps engineer receives access to a newly provisioned Google Kubernetes Engine (GKE) Standard cluster named `analytics-cluster` located in the `us-east1-b` zone. When running `kubectl get nodes`, the command fails with an error indicating that connection to `localhost:8080` was refused because the local environment lacks cluster endpoint credentials. Which `gcloud` command must the engineer execute to generate the necessary `kubeconfig` entry and enable `kubectl` management?

Show answer & explanation

Answer: gcloud container clusters get-credentials analytics-cluster --zone us-east1-b

Answer

The command `gcloud container clusters get-credentials analytics-cluster --zone us-east1-b` must be executed to populate the local `kubeconfig` file with the GKE cluster control plane endpoint and authentication credentials.
To manage a GKE cluster using `kubectl`, administrative credentials and endpoint IP information must be downloaded to the local environment. Running `gcloud container clusters get-credentials <cluster-name> --zone <zone>` obtains the cluster API server certificate and authentication token, updating `~/.kube/config` so `kubectl` can target the cluster.

Step-by-Step Solution

1
Identify the root cause of the `kubectl` connection failure.
The terminal error indicating connection to `localhost:8080` confirms that `kubectl` does not have an active context or valid cluster endpoint configured in `~/.kube/config`.
Without active cluster credentials, `kubectl` defaults to attempting a local API server connection.
2
Select the GKE utility command designed to update cluster access contexts.
`gcloud container clusters get-credentials` queries the GKE API for endpoint IP address and authentication certificates.
This command generates or updates entries in the user's `$HOME/.kube/config` file with proper authentication tokens.
3
Verify required parameters for single-zone GKE clusters.
Specifying `--zone us-east1-b` along with the cluster name `analytics-cluster` uniquely identifies the target cluster.
Zonal clusters require the target zone flag to resolve the correct cluster control plane.

Key Concept

GKE Cluster Credential Fetching via gcloud CLI
Question 890Question

Your team manages a production Cloud SQL for PostgreSQL instance configured with High Availability (HA) across two zones in the us-central1 region. As part of a disaster recovery audit, you are required to perform a controlled failover test to verify that the standby instance takes over primary duties without destroying or re-creating the database instance. Which command or action should you execute to accomplish this operational task?

Show answer & explanation

Answer: Execute `gcloud sql instances failover INSTANCE_NAME` to initiate a manual failover to the standby instance.

Answer

Execute the `gcloud sql instances failover INSTANCE_NAME` command to initiate a manual failover to the standby instance.
Executing `gcloud sql instances failover INSTANCE_NAME` triggers a controlled failover of a high-availability Cloud SQL instance to its secondary standby zone, making it the standard operational procedure for failover testing.

Step-by-Step Solution

1
Identify the administrative operational requirement for testing Cloud SQL High Availability.
Recognize that a manual failover trigger is required to failover from primary to standby.
Google Cloud SQL provides a dedicated operational command to simulate zone failovers for testing purpose without service disruption.
2
Select the correct gcloud CLI command targeting Cloud SQL instances.
Target the command `gcloud sql instances failover` specifying the instance name.
This command initiates the failover process, shifting traffic to the standby instance.

Key Concept

Managing Cloud SQL High Availability and manual failover procedures
Question 891Question

A cloud operations engineer manages a regional Google Kubernetes Engine (GKE) Standard cluster hosting stateless web services and background batch workloads. During peak traffic events, newly created Pods remain in the `Pending` state with `Insufficient cpu` status events, even though the cluster has autoscaling enabled globally. Investigation reveals that the specific node pool handling these Pods was created with a fixed size of 3 nodes and lacks node-pool-level autoscaling settings. Which command should the engineer execute to enable automatic node scaling for this specific node pool so it can scale from 3 up to 10 nodes when Pods cannot be scheduled?

Show answer & explanation

Answer: Run `gcloud container node-pools update <pool-name> --cluster=<cluster-name> --enable-autoscaling --min-nodes=3 --max-nodes=10` with the appropriate region or zone.

Answer

Execute `gcloud container node-pools update <pool-name> --cluster=<cluster-name> --enable-autoscaling --min-nodes=3 --max-nodes=10` with the target region or zone flag.
The correct command uses `gcloud container node-pools update` with `--enable-autoscaling --min-nodes=3 --max-nodes=10`. In GKE Standard clusters, even if autoscaling mechanisms are enabled at the cluster level, individual node pools require explicit autoscaling flags and min/max node boundaries to dynamically adjust node counts when Pods cannot be scheduled due to resource constraints.

Step-by-Step Solution

1
Identify the cause of unschedulable Pending Pods
Pods are stuck in Pending state because the host node pool has reached its fixed node capacity limit of 3 nodes.
Cluster Autoscaler requires node-pool-level minimum and maximum boundary configurations to expand node capacity.
2
Select the correct GKE CLI utility and command subgroup
Use `gcloud container node-pools update` to alter configuration settings of an existing node pool.
Cluster-level updates modify global cluster settings, while node-pool-specific parameters must be updated via the `node-pools` subgroup.
3
Apply the autoscaling flags with bounds
Pass `--enable-autoscaling --min-nodes=3 --max-nodes=10` along with cluster identification parameters.
This enables Cluster Autoscaler to dynamically provision additional Compute Engine instances within the 3 to 10 node range when pending Pods request resources.

Key Concept

GKE Cluster Autoscaler configuration requires setting `--enable-autoscaling`, `--min-nodes`, and `--max-nodes` on specific node pools via `gcloud container node-pools update`.
Question 892Question

A healthcare technology company is planning its Google Kubernetes Engine (GKE) cluster architecture to host an electronic health record integration system. The application requires strict network security, meaning cluster nodes must only have private internal IP addresses with restricted egress access through Cloud NAT. Additionally, the infrastructure team wants to eliminate manual worker node management, node provisioning, and security patching overhead without needing custom Linux kernel configurations. Which GKE cluster architectural design best satisfies these operational and security requirements?

Show answer & explanation

Answer: Deploy a GKE Autopilot private cluster configured with Cloud NAT for controlled egress.

Answer

Deploy a GKE Autopilot private cluster configured with Cloud NAT for controlled egress.
GKE Autopilot provides a hands-off cluster experience where Google manages node infrastructure, provisioning, scaling, and patching. Configuring Autopilot as a private cluster ensures worker nodes are assigned internal IP addresses only, fulfilling the requirement for network isolation combined with minimal operational maintenance.

Step-by-Step Solution

1
Analyze operational overhead requirements
GKE Autopilot provides a fully managed infrastructure environment where Google handles node creation, auto-scaling, security patching, and OS maintenance.
The requirement specifies eliminating worker node management overhead without requiring custom Linux kernel parameters.
2
Analyze network security requirements
Configuring the cluster as a Private Cluster ensures nodes receive private internal IP addresses only, while Cloud NAT provides outbound connectivity for essential updates and external API calls.
Nodes must not have public IP addresses exposed directly to the internet.
3
Synthesize optimal cluster architecture
Combining GKE Autopilot with Private Cluster topology and Cloud NAT meets all management and security constraints.
This strategy fulfills both zero node-management overhead and private network isolation constraints.

Key Concept

GKE Autopilot vs Standard and Private Cluster Architecture
Question 893Question

A cloud engineer needs to deploy a containerized microservice to an existing Google Kubernetes Engine (GKE) cluster using kubectl. Running kubectl commands currently fails because the local environment lacks authentication credentials for the cluster. Additionally, the microservice requires access to Cloud Storage buckets and must adhere to Google Cloud security best practices by avoiding long-lived downloaded service account keys. Which TWO actions should the cloud engineer perform?

Select all that apply

Show answer & explanation

Answer: Execute gcloud container clusters get-credentials to fetch cluster endpoints and update the local kubeconfig file.; Enable Workload Identity on the GKE cluster and bind the Kubernetes ServiceAccount to a Google Cloud IAM ServiceAccount.

Answer

The cloud engineer must execute gcloud container clusters get-credentials to update the local kubeconfig context, and configure Workload Identity by binding the Kubernetes ServiceAccount to a Google Cloud IAM ServiceAccount.
To interact with a GKE cluster using kubectl, administrators must run gcloud container clusters get-credentials to write cluster access context into their kubeconfig file. For secure GCP resource access, Workload Identity is the Google-recommended approach to grant Kubernetes ServiceAccounts permissions to IAM ServiceAccounts without static keys.

Step-by-Step Solution

1
Configure local CLI authentication for the GKE cluster API
The local kubeconfig file is populated with cluster certificate data and access tokens.
kubectl relies on context definitions within kubeconfig to direct API requests to the proper GKE control plane.
2
Configure keyless IAM authentication for GKE workloads
Pods running under the specified Kubernetes ServiceAccount obtain short-lived GCP tokens dynamically.
Workload Identity eliminates security risks associated with storing, managing, and rotating long-lived service account key files.

Key Concept

GKE Cluster Credential Retrieval and Keyless IAM Authentication via Workload Identity
Estimated Time:1m 30s
Question 894Question

A system administrator is deploying a production Cloud SQL for MySQL database named `corp-db` in the `us-central1` region. The instance must be configured with High Availability for multi-zone redundancy and must be restricted to internal network traffic within an existing VPC network named `prod-vpc`. Which TWO configuration steps must be performed to meet these requirements?

Select all that apply

Show answer & explanation

Answer: Establish a private services access connection (VPC Network Peering) between `prod-vpc` and Google Service Networking before creating the instance.; Include the `--availability-type=REGIONAL` flag when running the `gcloud sql instances create` command.

Answer

To configure a high-availability Cloud SQL instance accessible strictly via Private IP, you must establish a private services access connection between your VPC network and Google Service Networking, and specify `--availability-type=REGIONAL` when running `gcloud sql instances create`.
Establishing a private services access connection enables private IP routing between your VPC network and the Google service producer network, while the `--availability-type=REGIONAL` flag provisions a standby failover instance in a secondary zone to satisfy high availability requirements.

Step-by-Step Solution

1
Allocate an IP range and create a private services access connection in the target VPC network (`prod-vpc`).
Establishes VPC Network Peering between `prod-vpc` and the internal Google-managed infrastructure hosting Cloud SQL.
Cloud SQL managed instances run inside a Google-owned VPC network; private IP communication requires Private Service Networking peering.
2
Deploy the Cloud SQL instance using `gcloud sql instances create corp-db --network=prod-vpc --no-assign-ip --availability-type=REGIONAL --region=us-central1`.
Provisions a high-availability database instance with a primary zone and standby zone, bound strictly to the internal network.
Specifying `--availability-type=REGIONAL` ensures regional redundancy and failover capability, while referencing the network ensures Private IP assignment.

Key Concept

Configuring Cloud SQL High Availability and Private IP Connectivity
Question 895Question

An administrator needs to configure a continuous BigQuery billing export for detailed cost analysis across an organization. Arrange the following steps in the correct order to set up the BigQuery billing export from start to finish.

Drag items to arrange them in the correct order

Show answer & explanation

Answer

The correct sequential order begins with enabling the BigQuery API in the destination project, creating a destination BigQuery dataset, opening the Cloud Billing section for the target billing account, and finally specifying the destination project and dataset under Detailed Cost Export settings.
To set up a BigQuery Billing Export correctly, the destination environment must be prepared first: enable the BigQuery API, create a destination dataset, navigate to Cloud Billing for the target billing account, and finally link the export to the project and dataset.

Step-by-Step Solution

1
Enable the BigQuery API in the target destination project.
The destination project is prepared to manage BigQuery resources.
BigQuery dataset creation and table ingestion require the BigQuery API to be active in the target project.
2
Create a BigQuery dataset in the target project.
A destination container is created to hold incoming daily billing export tables.
Cloud Billing export configuration requires an existing BigQuery dataset as its target.
3
Access Cloud Billing in the Google Cloud console and select the target billing account.
The billing account management interface and export options become accessible.
Billing exports are scoped to the billing account level rather than an individual project.
4
Navigate to Billing export, select the created project and dataset for Detailed Cost Export, and save.
Continuous export of billing records into BigQuery is established.
This final step binds the billing account export pipeline to the prepared BigQuery dataset.

Key Concept

BigQuery Billing Export Setup Workflow
Question 896Question

Your organization runs a high-traffic e-commerce application on Google Cloud. Analytical clickstream event data is written continuously to a Cloud Bigtable instance, while transactional orders are stored in a Cloud SQL for PostgreSQL instance. Monitoring alerts indicate that CPU utilization on the Cloud Bigtable cluster has exceeded 80% for the past 20 minutes, leading to increased write latency for incoming events. You need to quickly mitigate the Bigtable performance bottleneck without causing data loss or downtime. Which action should you take?

Show answer & explanation

Answer: Increase the number of nodes in the Cloud Bigtable cluster.

Answer

Increase the number of nodes in the Cloud Bigtable cluster.
Increasing the node count of a Cloud Bigtable cluster immediately adds processing power and storage throughput. Bigtable node scaling is dynamic and zero-downtime, allowing the cluster to rebalance table partitions (tablets) across the new nodes to lower CPU utilization below target thresholds.

Step-by-Step Solution

1
Identify the resource experiencing high CPU utilization and performance degradation.
Cloud Bigtable CPU utilization is exceeding target thresholds (>80%), leading to elevated write latency.
Bigtable performance scales linearly with the number of active nodes allocated to a cluster.
2
Evaluate scaling options for Cloud Bigtable operational management.
Adding nodes to a cluster dynamically increases CPU capacity and I/O bandwidth without downtime.
Bigtable automatically rebalances table partitions (tablets) across the updated node pool.
3
Execute node count expansion via gcloud CLI or Cloud Console.
CPU load per node drops below threshold and write latency returns to normal levels.
This directly resolves the compute bottleneck while preserving live streaming ingestion.

Key Concept

Cloud Bigtable operational scaling and performance management
Estimated Time:2m 0s
Question 897Question

A cloud systems engineer is deploying a non-fault-tolerant telemetry processing application onto a Google Compute Engine VM named `telemetry-node-01` in the `europe-west3-a` zone. The VM requires a dedicated user-managed service account `[email protected]` for identity authorization, must attach an existing persistent disk named `log-archive-disk` in read-only mode to prevent data corruption, and must not be assigned a public external IP address. Which `gcloud` command correctly provisions this Compute Engine virtual machine instance according to these requirements?

Show answer & explanation

Answer: gcloud compute instances create telemetry-node-01 --zone=europe-west3-a [email protected] --no-address --disk=name=log-archive-disk,mode=ro

Answer

The correct command is `gcloud compute instances create telemetry-node-01 --zone=europe-west3-a [email protected] --no-address --disk=name=log-archive-disk,mode=ro`.
The command correctly uses `--service-account` to assign the user-managed service account identity, `--no-address` to omit an external IP address, and `--disk=name=log-archive-disk,mode=ro` to attach the existing persistent disk in read-only mode while maintaining standard provisioning for a non-fault-tolerant process.

Step-by-Step Solution

1
Identify the proper service account attachment flag
Use `[email protected]` to attach the custom service account identity.
The `--scopes` flag specifies API permission aliases/URIs, whereas `--service-account` sets the identity of the VM instance.
2
Identify the network interface configuration flag for disabling external IP addresses
Use `--no-address`.
In `gcloud compute instances create`, `--no-address` explicitly prevents the creation of an ephemeral or static external IP address on the default network interface.
3
Identify persistent disk attachment flags and workload suitability criteria
Use `--disk=name=log-archive-disk,mode=ro` and avoid Spot instance provisioning.
Specifying `mode=ro` mounts the existing disk as read-only. Standard provisioning must be used instead of Spot/Preemptible VMs because the workload is non-fault-tolerant.

Key Concept

Provisioning Compute Engine instances using gcloud CLI with custom service accounts, private networking, and attached persistent disks
Question 898Question

Your organization needs to configure Google Cloud DNS to resolve internal service hostnames to private IP addresses within a Virtual Private Cloud (VPC) network. In what order should an engineer perform the administrative steps to establish and validate internal DNS resolution?

Drag items to arrange them in the correct order

Show answer & explanation

Answer

The correct sequence is: 1) Create the Cloud DNS private managed zone, 2) Authorize the target VPC network, 3) Add the A record set mapping the hostname to the private IP address, and 4) Perform a DNS lookup test from a VM within the authorized VPC network.
The deployment workflow follows a logical dependency chain: First, create the private managed zone to establish the internal DNS namespace. Second, authorize the specific VPC network so instances in that network have permission to query the zone. Third, populate the zone by adding A records mapping service names to internal IP addresses. Fourth, test and verify resolution from a VM located inside the authorized network.

Step-by-Step Solution

1
Initialize the Private Managed Zone
Creates the DNS namespace with private visibility scope in Cloud DNS.
You cannot add DNS records or authorize networks without an existing managed zone.
2
Bind Network Authorization
Associates the VPC network with the private managed zone.
Private DNS zones are invisible and inaccessible to VPC networks until explicitly authorized.
3
Add Resource Record Sets
Maps specific domain hostnames to their corresponding internal IPv4 addresses.
The zone container and authorization must exist before inserting resource records.
4
Validate DNS Resolution
Confirms successful name resolution from internal compute resources.
End-to-end testing requires both the record configuration and authorized network access to be active.

Key Concept

Cloud DNS Private Zone Creation and VPC Network Authorization Sequence
Estimated Time:1m 30s
Question 899Question

A software engineer needs to deploy new revisions to an existing Cloud Run service and view application logs in a specific Google Cloud project. The engineer must not be able to modify service IAM policies, delete the service, or manage other infrastructure in the project. Which role assignment follows Google's recommended practice of least privilege?

Show answer & explanation

Answer: Grant the Cloud Run Developer role (roles/run.developer) on the specific Cloud Run service and the Logs Viewer role (roles/logging.viewer) at the project level.

Answer

Granting the Cloud Run Developer role on the specific Cloud Run service paired with the Logs Viewer role at the project level provides the minimal permissions necessary to deploy new revisions and inspect logs without allowing service deletion or project-wide administrative control.
Granting Cloud Run Developer scoped directly to the targeted Cloud Run service alongside Logs Viewer at the project level adheres strictly to least privilege by enabling revision deployments and log viewing while prohibiting service deletion, IAM policy edits, or broad project access.

Step-by-Step Solution

1
Identify the minimum required operations.
The user needs to deploy revisions to a single Cloud Run service and inspect project execution logs.
Following the principle of least privilege requires isolating the scope to only required operations.
2
Evaluate role selection between Primitive and Predefined roles.
Select Cloud Run Developer (roles/run.developer) instead of primitive Editor or broad Cloud Run Admin roles.
Predefined roles target specific service capabilities without exposing administrative actions like deleting resources or editing security policies.
3
Determine appropriate resource scoping in the GCP hierarchy.
Bind Cloud Run Developer on the specific service resource rather than project-wide, and bind Logs Viewer at the project level.
Scoping resource-level access limits actions strictly to the intended resource.

Key Concept

Principle of Least Privilege using Predefined IAM Roles
Question 900Question

An enterprise IoT management solution running on Compute Engine instances inside a Virtual Private Cloud (VPC) receives raw, non-HTTP TCP telemetry data on port 8883 from internal client instances. The client instances must reach the load balancing backend using a private domain name (iot.internal.example.com), and the solution must preserve client source IP addresses for logging. Which TWO architectural components should you configure to meet these requirements?

Select all that apply

Show answer & explanation

Answer: An Internal Passthrough Network Load Balancer targeting the backend Compute Engine instance group on TCP port 8883; A Cloud DNS private managed zone containing an A record for iot.internal.example.com pointing to the load balancer forwarding rule IP

Answer

Configure an Internal Passthrough Network Load Balancer targeting the Compute Engine instance group on TCP port 8883, and set up a Cloud DNS private managed zone with an A record pointing to the load balancer forwarding rule IP address.
For internal non-HTTP TCP traffic (such as telemetry over port 8883) that requires preserving client IP addresses, an Internal Passthrough Network Load Balancer is required because it functions at Layer 4 without proxying. Furthermore, resolving custom domain names privately inside a VPC requires a Cloud DNS private managed zone associated with that VPC network.

Step-by-Step Solution

1
Analyze traffic protocol and scope requirements
The traffic is non-HTTP raw TCP on port 8883 originating from internal VPC clients, requiring source IP preservation.
Layer 4 passthrough balancing is required because Layer 7 proxies do not support non-HTTP traffic and proxy load balancers replace the client IP address.
2
Select the load balancer type
Choose an Internal Passthrough Network Load Balancer.
It operates at Layer 4 for internal VPC traffic and preserves original client IP addresses.
3
Select the DNS configuration
Configure a Cloud DNS private managed zone with an A record pointing to the internal forwarding rule IP address.
Private DNS zones provide domain resolution strictly accessible within specified VPC networks.

Key Concept

Planning Layer 4 Internal Load Balancing and Private DNS Resolution
Estimated Time:1m 30s
PreviousPage 45 / 80Next
All practice questions — Google Cloud Associate Cloud Engineer | Examkin