All practice questions

1591 questions

Question 861Question

A media streaming company is using the Google Cloud Pricing Calculator to estimate monthly compute expenses for a video transcribing pipeline. The system requires 10 Compute Engine virtual machines running 24 hours a day, 7 days a week for steady-state ingestion, alongside a temporary pool of 30 virtual machines that run for only 3 hours each night to process video rendering jobs. Which configuration approach in the Google Cloud Pricing Calculator provides the most accurate and cost-effective monthly cost estimate for this workload?

Show answer & explanation

Answer: Apply Committed Use Discounts (CUDs) to the 10 continuous ingestion virtual machines and configure Spot VMs or hourly usage for the 3-hour nightly rendering pool.

Answer

Apply Committed Use Discounts (CUDs) to the 10 continuous ingestion virtual machines and configure Spot VMs or hourly usage for the 3-hour nightly rendering pool.
The correct option properly separates the continuous baseline workload from the transient batch workload. Baseline workloads running 24/7 benefit from Committed Use Discounts (CUDs) in the Pricing Calculator, while short-lived fault-tolerant nightly jobs are accurately modeled using Spot VMs or actual hourly usage.

Step-by-Step Solution

1
Analyze the steady-state baseline workload requirements.
Identified 10 Compute Engine VMs running 24/7 continuously throughout the month.
Continuous baseline workloads qualify for Committed Use Discounts (1-year or 3-year commitments), providing the highest predictable savings.
2
Analyze the batch processing workload requirements.
Identified 30 Compute Engine VMs running transiently for 3 hours per night.
Fault-tolerant, short-duration batch tasks should be estimated using Spot VMs or on-demand hourly usage rather than full monthly CUD commitments.
3
Combine the estimation parameters in the Google Cloud Pricing Calculator.
The calculator reflects CUD savings for continuous baseline VMs and hourly/Spot pricing for transient batch VMs.
This strategy accurately estimates actual resource consumption without overcommitting capital or exposing baseline workloads to preemption risks.

Key Concept

Estimating Google Cloud Compute Engine expenses by properly matching Committed Use Discounts to baseline workloads and Spot/On-Demand pricing to transient batch workloads in the Pricing Calculator.
Question 862Question

An organization needs to set up a continuous export of detailed Cloud Billing data to BigQuery to enable custom SQL auditing across all linked projects. Which configuration steps and permissions are required to achieve this continuous export? (Select TWO)

Select all that apply

Show answer & explanation

Answer: Create a BigQuery dataset in the target project designated to store the exported billing data.; Assign the Billing Account Administrator or Billing Account Costs Manager role on the Cloud Billing account to the user configuring the export.

Answer

To configure Cloud Billing export to BigQuery, you must create a destination BigQuery dataset in a target project and ensure the user performing the setup holds the Billing Account Administrator or Billing Account Costs Manager role on the Cloud Billing account.
Setting up BigQuery billing export requires two distinct prerequisites: creating a destination BigQuery dataset in the project meant to hold billing tables, and holding explicit billing IAM roles (Billing Account Administrator or Billing Account Costs Manager) on the Cloud Billing account.

Step-by-Step Solution

1
Identify the target BigQuery dataset requirement
Confirm that a BigQuery dataset must be created beforehand in a GCP project to receive billing logs.
Cloud Billing export cannot create new datasets automatically during setup.
2
Identify the required Cloud Billing IAM roles
Determine that permissions must be explicitly granted on the Cloud Billing account.
Project roles (such as Project Owner) do not grant access to manage Cloud Billing account settings.

Key Concept

BigQuery Cloud Billing Export Prerequisites and IAM Roles
Estimated Time:1m 30s
Question 863Question

A cloud security administrator needs to grant an external auditing team access to view the configuration and metadata of Compute Engine virtual machine instances within a specific Google Cloud project. The auditors must not be able to start, stop, modify, or delete any instances, nor should they have access to view resources in other Google Cloud services within the project. Following Google's recommended best practice of applying the principle of least privilege, which IAM role should be assigned to the auditing team on the project?

Show answer & explanation

Answer: Compute Viewer (roles/compute.viewer)

Answer

Assign the Compute Viewer (roles/compute.viewer) role to the auditing team at the project level.
The Compute Viewer (roles/compute.viewer) role is a predefined role that grants read-only access to Compute Engine resources. It allows users to view virtual machine instance configurations, metadata, and status without permitting actions that modify instances (such as starting, stopping, or deleting) and without granting access to view resources in other GCP services within the project.

Step-by-Step Solution

1
Analyze the access requirements
The user needs read-only access restricted strictly to Compute Engine resources.
The scenario explicitly limits permissions to viewing virtual machine instance configurations while prohibiting modifications and access to other project services.
2
Evaluate Google Cloud IAM role types
Predefined roles should be chosen over Primitive roles (Owner, Editor, Viewer).
Primitive roles like Viewer apply project-wide across all services, violating least privilege.
3
Select the specific predefined role
Compute Viewer (roles/compute.viewer) provides read-only permissions for Compute Engine resources only.
This role grants necessary permissions for viewing Compute Engine instance details while restricting modification capabilities and access to other Google Cloud services.

Key Concept

Selecting predefined IAM roles over primitive roles to adhere to the principle of least privilege.
Estimated Time:1m 15s
Question 864Question

An infrastructure administrator needs to optimize a Google Kubernetes Engine (GKE) Standard cluster to handle fluctuating workload demands while maintaining application availability during node upgrades. The workload requires custom node OS kernel parameters. Which TWO configurations must the administrator implement? (Select TWO)

Select all that apply

Show answer & explanation

Answer: Enable the Cluster Autoscaler on the GKE node pool using gcloud container node-pools update with --enable-autoscaling, --min-nodes, and --max-nodes flags.; Specify CPU and memory resource requests in the Pod manifests and configure a Pod Disruption Budget (PDB) for the deployment.

Answer

The administrator must enable Cluster Autoscaler on the GKE node pool using gcloud container node-pools update, and specify Pod resource requests alongside a Pod Disruption Budget.
Enabling Cluster Autoscaler on the GKE node pool ensures worker nodes scale according to demand. Setting explicit Pod resource requests is required for Cluster Autoscaler to identify pending Pods, and establishing a Pod Disruption Budget guarantees workload availability during node updates. GKE Standard must be retained because custom node OS kernel tuning is disallowed in GKE Autopilot.

Step-by-Step Solution

1
Configure node pool autoscaling via gcloud CLI
Worker nodes scale up or down automatically based on unschedulable Pods and resource usage.
Cluster Autoscaler operates on GKE node pools to resize compute capacity.
2
Define Pod resource requests and Pod Disruption Budgets
Cluster Autoscaler detects pending Pods triggered by explicit resource requests, while PDBs enforce minimum availability during node maintenance.
Without resource requests Cluster Autoscaler cannot evaluate pending Pod demand, and without PDBs node maintenance can cause unexpected downtime.

Key Concept

Managing GKE Cluster Autoscaler, Pod Resource Requests, and Pod Disruption Budgets
Estimated Time:1m 30s
Question 865Question

A digital publishing platform requires a fully managed GCP database service to store user profile documents, user session state, and content metadata. The workload demands flexible schema support, automatic multi-region replication with strong consistency, sub-second latency for document lookups, and zero database server management overhead. Which Google Cloud service should the cloud engineer select to meet these requirements?

Show answer & explanation

Answer: Firestore in Native mode

Answer

Firestore in Native mode is the correct service choice.
Firestore in Native mode is a serverless, document-oriented NoSQL database that automatically manages scaling, replication, and high availability across multi-region locations. It natively handles flexible JSON document hierarchies with strong consistency and requires no server administration.

Step-by-Step Solution

1
Analyze the workload requirements
Identified key requirements: fully managed document/JSON storage, flexible schema, multi-region strong consistency, sub-second latency, and zero server administration.
Matching technical constraints to GCP storage services ensures choosing the optimal service according to Google recommended practices.
2
Evaluate database paradigm options
Firestore is a serverless NoSQL document database designed for high availability, automatic scaling, document flexibility, and transactional multi-region support without database instance management.
Relational options like Cloud SQL require instance provisioning, maintenance, and fixed schemas, while object storage tiers like Coldline are intended for archival.

Key Concept

Selecting GCP Database and Storage Options based on workload requirements
Question 866Question

A cloud engineer must deploy a new relational database instance named `orders-db` for an e-commerce order management platform in the `us-central1` region. The database requires ACID transactional consistency, high availability across multiple zones within the region, automated daily backups, and strict security compliance prohibiting public IP addresses. The database must connect directly to an existing Virtual Private Cloud (VPC) named `production-vpc`. Which `gcloud` command should the engineer execute to provision this database instance?

Show answer & explanation

Answer: gcloud sql instances create orders-db --database-version=MYSQL_8_0 --tier=db-custom-4-15360 --region=us-central1 --availability-type=REGIONAL --network=projects/my-project/global/networks/production-vpc --no-assign-ip --backup-start-time=02:00

Answer

The command running `gcloud sql instances create orders-db` with `--availability-type=REGIONAL`, `--network=projects/my-project/global/networks/production-vpc`, and `--no-assign-ip` correctly provisions a managed, highly available Cloud SQL relational database connected exclusively via Private IP.
The correct response provisions a managed Cloud SQL for MySQL instance using `gcloud sql instances create`. Setting `--availability-type=REGIONAL` enables primary and standby instances across multiple zones within `us-central1` for automatic failover. Combining `--network` with `--no-assign-ip` ensures the instance is accessible strictly via Private IP over Private Service Access within the `production-vpc` network, fulfilling all security and functional mandates.

Step-by-Step Solution

1
Identify the database engine requirements
The requirement specifies a relational database with transactional consistency (ACID) for order management, pointing to Cloud SQL rather than Cloud Bigtable or a custom VM.
Cloud SQL provides managed relational engines (MySQL, PostgreSQL, SQL Server) suitable for transactional e-commerce workloads.
2
Determine high availability and network configuration flags
High availability requires `--availability-type=REGIONAL`. Private VPC access without internet exposure requires `--network=[VPC_PATH]` and `--no-assign-ip`.
The `--no-assign-ip` flag prevents assigning a public IPv4 address, and `--network` provisions the instance within Private Service Access inside the target VPC.
3
Select the compliant command syntax
The command deploying `gcloud sql instances create` with regional availability and `--no-assign-ip` satisfies all architectural and security constraints.
All other options either expose public IPs, select NoSQL database engines, or attempt to create standard Compute Engine VMs.

Key Concept

Cloud SQL Private IP and Regional High Availability Provisioning
Question 867Question

An administrator needs to gather OS-level telemetry, such as memory utilization and disk space usage, from a Compute Engine virtual machine instance and export it to Google Cloud Observability. Which software agent should the administrator install on the VM instance?

Show answer & explanation

Answer: The Google Cloud Ops Agent

Answer

The administrator should install the Google Cloud Ops Agent on the Compute Engine virtual machine instance.
The Google Cloud Ops Agent is the official unified telemetry collection agent for Google Compute Engine. It runs inside the guest OS to collect system metrics (including memory usage, disk utilization, and process metrics) as well as system logs, streaming them directly to Google Cloud Observability.

Step-by-Step Solution

1
Identify the telemetry requirement
OS-level telemetry (memory utilization and disk usage) requires an agent inside the VM guest OS.
Compute Engine hypervisor metrics only cover CPU and network metrics external to the guest OS.
2
Select the current Google-recommended telemetry agent
Choose the Google Cloud Ops Agent.
The Google Cloud Ops Agent is the active unified agent for collecting both metrics and logs from Compute Engine instances.

Key Concept

Compute Engine OS-Level Telemetry with Google Cloud Ops Agent
Question 868Question

A cloud engineer manages a high-throughput processing pipeline deployed on a Google Kubernetes Engine (GKE) Standard cluster. The workload manifests define Pods with heavy CPU resource requests (2000m2000\text{m} per Pod). During peak loads, the Horizontal Pod Autoscaler (HPA) scales the deployment replica count up, causing multiple newly created Pods to remain in the `Pending` state with the event reason `FailedScheduling`. Inspection reveals that the existing node pool has reached its maximum configured size under Cluster Autoscaler, and no existing nodes have sufficient unallocated CPU to schedule the pending Pods. The engineer wants GKE to automatically provision entirely new node pools with appropriate machine types and scale limits when existing node pools cannot accommodate Pod resource requests. Which command should the engineer execute to meet this operational requirement?

Show answer & explanation

Answer: gcloud container clusters update production-cluster --enable-autoprovisioning --max-cpu=128 --max-memory=512 --region=us-central1

Answer

Execute `gcloud container clusters update production-cluster --enable-autoprovisioning --max-cpu=128 --max-memory=512 --region=us-central1` to enable GKE Node Auto-provisioning.
The correct command updates the GKE cluster configuration to enable Node Auto-provisioning (NAP). NAP is an advanced feature of GKE Cluster Autoscaler that automatically provisions new node pools with matching CPU, memory, and machine specifications when unschedulable Pods cannot fit onto existing node pools or when existing node pools reach maximum scale limits.

Step-by-Step Solution

1
Analyze the operational failure.
Pods are in a `Pending` state because nodes lack available CPU allocation, and existing node pools have reached their Cluster Autoscaler max-nodes boundary.
Standard Cluster Autoscaler only scales existing node pools up to their defined `--max-nodes` limit and cannot create new node pools with different machine sizes unless configured to do so.
2
Evaluate GKE resource auto-management capabilities.
Node Auto-provisioning (NAP) extends Cluster Autoscaler by dynamically creating, sizing, and deleting node pools based on unschedulable Pod resource requests and limits.
NAP requires cluster-level enablement with maximum resource limits specified (`--max-cpu` and `--max-memory`).
3
Identify the correct command parameters.
The `gcloud container clusters update` command with `--enable-autoprovisioning` and global cluster capacity constraints enables dynamic node pool provisioning.
This allows GKE to spin up new node pools automatically when unschedulable Pods demand hardware configurations outside existing node pool parameters.

Key Concept

GKE Node Auto-provisioning (NAP)
Question 869Question

An infrastructure team is deploying a containerized microservice to Google Cloud Run in the `us-central1` region using the `gcloud` CLI. The container is configured internally to listen on port `3000` rather than the default port `8080`, and the service must be restricted so that unauthenticated public requests are rejected. Which TWO flags must be included in the `gcloud run deploy` command to satisfy these operational requirements? (Select TWO.)

Select all that apply

Show answer & explanation

Answer: Specify the flag --port 3000 to instruct Cloud Run to route incoming traffic to the container's listening port.; Specify the flag --no-allow-unauthenticated to enforce IAM authentication on the deployed service.

Answer

To deploy a container listening on port 3000 and block unauthenticated access, the deployment command must include both the flag to specify port 3000 and the flag to disable unauthenticated invocations.
When deploying a containerized workload to Cloud Run that listens on a non-standard port, specifying the container ingress port flag informs Cloud Run where to direct incoming HTTP traffic. Combining this with the flag to require authentication enforces least-privilege security by ensuring only authorized IAM principals can invoke the microservice.

Step-by-Step Solution

1
Identify the ingress container port configuration flag for Cloud Run.
The flag `--port 3000` explicitly tells Cloud Run to direct HTTP requests to port 3000 on the container.
By default Cloud Run expects the container to listen on port 8080.
2
Identify the authentication control flag for Cloud Run deployment.
The flag `--no-allow-unauthenticated` removes public access and requires IAM authentication for requests.
Omitting this flag or specifying `--allow-unauthenticated` would make the service publicly accessible to the internet.

Key Concept

Deploying containerized workloads to Cloud Run with custom port configurations and IAM invocation controls.
Question 870Question

An online learning platform needs to serve static video assets and course documents to internet users globally over HTTPS. To minimize latency and reduce origin server load, static assets must be cached at the Google network edge, and SSL/TLS termination must occur at the global edge. Which TWO Google Cloud networking components or features should you include in your architecture plan?

Select all that apply

Show answer & explanation

Answer: Global External Application Load Balancer with Google-managed SSL certificates; Cloud CDN enabled on the load balancer backend service or storage bucket

Answer

Deploy a Global External Application Load Balancer to terminate global HTTPS traffic at the edge and enable Cloud CDN on the backend to cache static assets.
A Global External Application Load Balancer handles global public HTTP(S) requests and supports Google-managed SSL certificates at the network edge. Enabling Cloud CDN on the load balancer's backend leverages Google's global PoPs to cache static video and document assets close to users, reducing latency and origin workload.

Step-by-Step Solution

1
Analyze the entry point and protocol requirements
External internet users need access over HTTPS with edge SSL termination, requiring a Global External Application Load Balancer (HTTP/HTTPS).
Layer 7 external load balancing is required to handle HTTP(S) traffic globally and terminate TLS at Google's edge.
2
Analyze the caching requirement
Cloud CDN must be attached to the backend service or Cloud Storage bucket underlying the external load balancer.
Cloud CDN utilizes Google's global points of presence (PoPs) to store cached copies of static assets near end users.

Key Concept

Planning Global Load Balancing and Edge Caching with Cloud CDN
Question 871Question

You need to export a Cloud SQL for MySQL database instance to a Cloud Storage bucket for offline archiving using Google Cloud CLI tools. In what order should you execute the steps to complete this operation?

Drag items to arrange them in the correct order

Show answer & explanation

Answer

The correct order of operations is: first, create the target Cloud Storage bucket; second, grant the Cloud SQL instance service account write permissions on the bucket; third, execute the `gcloud sql export sql` command.
Exporting data from Cloud SQL to Cloud Storage requires preparing the storage destination prior to initiating the export command. First, the destination bucket must exist. Second, because Cloud SQL performs exports using the instance service account identity, that account must be granted Storage Object Admin permissions on the target bucket. Finally, the user runs `gcloud sql export sql` to execute the export.

Step-by-Step Solution

1
Create the destination Cloud Storage bucket.
A Cloud Storage bucket URI is available for storing the database dump file.
The export command requires a valid destination bucket URI.
2
Assign write permissions on the bucket to the Cloud SQL service account.
The Cloud SQL instance's service account is authorized to write objects to the destination bucket.
Cloud SQL executes export operations asynchronously under its own service account identity, not the identity of the user running gcloud.
3
Execute `gcloud sql export sql`.
The export job is submitted and database contents are written to the specified Cloud Storage object path.
Running the gcloud command initiates the export process after prerequisites are satisfied.

Key Concept

Cloud SQL data export procedures and IAM authorization requirements
Question 872Question

A cloud administrator creates a new regional Google Kubernetes Engine (GKE) cluster named `analytics-prod-cluster` in the `us-east1` region. The administrator opens a local terminal on a workstation where the `gcloud` CLI is installed and authenticated with proper Cloud IAM permissions. However, when executing `kubectl get nodes`, the terminal returns an error stating that the cluster context cannot be found. Which command should the administrator execute to populate the local `kubeconfig` file with the cluster credentials?

Show answer & explanation

Answer: gcloud container clusters get-credentials analytics-prod-cluster --region us-east1

Answer

The administrator must execute `gcloud container clusters get-credentials analytics-prod-cluster --region us-east1` to update the local `kubeconfig` file.
Executing `gcloud container clusters get-credentials analytics-prod-cluster --region us-east1` retrieves the cluster's endpoint information and credentials from Google Cloud, automatically generating or updating the local `kubeconfig` file. This establishes the active context for `kubectl` to issue commands to the cluster control plane.

Step-by-Step Solution

1
Identify the requirement to configure kubectl to communicate with a newly provisioned regional GKE cluster.
Recognize that kubectl requires cluster endpoints and security credentials stored in the local ~/.kube/config file.
Creating a cluster on Google Cloud does not automatically update local workstation context configurations.
2
Select the appropriate gcloud command to download the cluster credentials.
Specify `gcloud container clusters get-credentials` along with the cluster name (`analytics-prod-cluster`) and the region parameter (`--region us-east1`).
This command fetches endpoint details, generates an access token, and sets the active context in the local kubeconfig file.

Key Concept

Fetching GKE cluster credentials to configure local kubectl context
Question 873Question

A cloud engineer wants to ensure that an existing Cloud Run service named `payments-api` always keeps a minimum of 3 container instances ready to serve incoming traffic to avoid cold start latencies. Which `gcloud` command should the engineer execute?

Show answer & explanation

Answer: gcloud run services update payments-api --min-instances 3

Answer

The command 'gcloud run services update payments-api --min-instances 3' correctly configures the service to keep 3 warm instances active.
Executing 'gcloud run services update payments-api --min-instances 3' updates the Cloud Run service configuration so that at least 3 instances remain provisioned and warm, mitigating cold start latency.

Step-by-Step Solution

1
Identify the target resource and operation
The target is an existing Cloud Run service named `payments-api`, and the goal is to set a lower bound for instance scaling.
Setting minimum instances ensures container instances remain warm and ready to receive requests without cold start delays.
2
Determine the correct gcloud command and flag
Use 'gcloud run services update payments-api' with the '--min-instances 3' flag.
The '--min-instances' flag explicitly controls the minimum number of container instances provisioned for a Cloud Run service.

Key Concept

Cloud Run Instance Provisioning and Minimum Instances
Estimated Time:45s
Question 874Question

A cloud engineer is managing a production Google Kubernetes Engine (GKE) Standard cluster that hosts both a critical payment microservice and a batch data processing job. The batch data processing job should only execute on dedicated Spot VM node pools to reduce operational costs, while the payment microservice must remain strictly isolated on on-demand Compute Engine nodes to prevent unexpected termination. Which TWO configuration steps must the engineer take to achieve this workload isolation? Select two.

Select all that apply

Show answer & explanation

Answer: Apply a node taint to the Spot VM node pool and configure matching tolerations on the batch data processing Pod specification.; Configure nodeSelector or nodeAffinity rules on the batch data processing Pod specification to explicitly target the Spot VM node pool labels.

Answer

To isolate workloads on GKE, you must apply a node taint to the Spot VM node pool along with matching tolerations on the batch processing Pods, and configure nodeSelector or nodeAffinity rules on the batch Pod specification to explicitly target the Spot node pool labels.
Workload isolation on GKE requires a combination of taints/tolerations and node affinity. Tainting the Spot VM node pool ensures that general workloads (like the payment microservice) are repelled from preemptible nodes. Adding tolerations to the batch processing Pod manifest allows it to be placed on tainted nodes, while defining nodeSelector or nodeAffinity rules actively pulls the batch Pods to the Spot VM node pool.

Step-by-Step Solution

1
Repel non-batch Pods from Spot nodes
Applying taints to the Spot node pool prevents Pods without matching tolerations (such as the payment microservice) from scheduling on Spot instances.
Taints act as repellants on nodes to ensure un-tolerated Pods are not placed on preemptible hardware.
2
Allow and direct batch Pods onto Spot nodes
Adding tolerations and nodeSelector/nodeAffinity to the batch Pod manifest enables them to tolerate the Spot taint and explicitly attracts them to the designated node pool.
Tolerations allow Pods to bound to tainted nodes, while nodeAffinity ensures Pods actively select those specific nodes.

Key Concept

Workload Isolation in GKE using Taints, Tolerations, and Node Affinity
Estimated Time:2m 0s
Question 875Question

A healthtech enterprise is modeling monthly infrastructure expenses in the Google Cloud Pricing Calculator for a healthcare analytics solution. The architecture consists of Compute Engine VMs running continuous data processing jobs, Cloud Storage buckets for short-term and long-term log retention, and network egress to an external auditor. Which of the following statements accurately describe how cost estimation principles and discount mechanisms apply when configuring this estimate in the Pricing Calculator? (Select TWO.)

Select all that apply

Show answer & explanation

Answer: Sustained Use Discounts (SUDs) are automatically calculated and applied by the calculator for eligible Compute Engine VM instance types running for a significant portion of the billing month.; Outbound data transfers from Google Cloud to an external non-Google Cloud destination incur egress costs and must be explicitly specified in the calculator.

Answer

The correct statements are that Sustained Use Discounts (SUDs) are automatically applied in the Pricing Calculator for eligible Compute Engine instances running for a significant portion of the month, and outbound network traffic to external non-GCP destinations incurs egress charges that must be explicitly entered into the calculator.
Sustained Use Discounts (SUDs) automatically accrue when eligible Compute Engine instances run for more than 25% of a billing month, and the pricing calculator reflects this baseline behavior. Furthermore, data egress to external non-GCP destinations carries network usage fees that must be manually input into the estimator for complete budget planning.

Step-by-Step Solution

1
Analyze Compute Engine discount behaviors in the GCP Pricing Calculator
Recognize that Sustained Use Discounts (SUDs) automatically apply to eligible on-demand workloads running continuously, while Committed Use Discounts (CUDs) override SUDs rather than stacking.
GCP discount logic prevents double-dipping; CUD rates take precedence over SUD rates on committed resources.
2
Evaluate network egress estimation requirements
Identify that data transferred out of Google Cloud network boundaries to external locations incurs egress pricing and must be explicitly estimated.
Ingress traffic is generally free, but external internet egress is a billable item that must be included for accurate total cost calculations.
3
Verify Spot VM discount eligibility
Confirm that Spot VMs are exempt from SUDs and CUDs because they already receive up to 60-91% off standard on-demand pricing.
Spot instances feature dynamic pricing without additional sustained or committed use discount layers.

Key Concept

Estimating GCP Compute and Network Egress Costs with the Pricing Calculator
Question 876Question

An e-commerce company is planning its Google Kubernetes Engine (GKE) cluster architecture to support two distinct workloads: a core inventory management microservice and a background batch analytics pipeline. The team needs to minimize operational overhead for cluster and node infrastructure administration for the microservices, while optimizing compute costs for the fault-tolerant batch pipeline which can tolerate node preemptions. Which TWO architectural decisions should the team select to meet these requirements?

Select all that apply

Show answer & explanation

Answer: Deploy the inventory microservice on a GKE Autopilot cluster to eliminate manual node provisioning and infrastructure management overhead.; Provision a dedicated Spot VM node pool for the batch analytics workload to significantly reduce compute expenses for fault-tolerant jobs.

Answer

Deploy the inventory microservice on a GKE Autopilot cluster to minimize node management overhead, and provision a dedicated Spot VM node pool to cost-optimize the fault-tolerant batch analytics pipeline.
GKE Autopilot abstracts away all worker node administration, providing fully managed cluster infrastructure ideal for minimizing operational overhead. Concurrently, utilizing Spot VM node pools for batch analytics provides maximum cost reduction while matching the workload's tolerance for preemption.

Step-by-Step Solution

1
Evaluate the operational overhead requirement for microservice hosting.
GKE Autopilot is selected because Google manages the underlying nodes, security patching, and auto-scaling.
GKE Standard leaves node pool management and infrastructure tuning to the user.
2
Evaluate the cost and resiliency requirements for the batch pipeline.
Spot VM node pools are selected for the batch analytics workload.
Spot VMs provide significant cost reductions and are ideal for stateless, fault-tolerant batch processing that can sustain preemption.

Key Concept

Selecting between GKE Autopilot vs. Standard operational models and integrating Spot VM node pools for batch workloads.
Question 877Question

An e-commerce platform relies on a Compute Engine Managed Instance Group (MIG) to serve dynamic web traffic. During high-volume flash sales, incoming load surges rapidly. The application binary deployed on each virtual machine requires approximately 4 minutes to load configuration files and warm up local caches before it can successfully process requests. However, the MIG autoscaler currently evaluates metrics continuously and provisions additional virtual machines every 60 seconds, creating significantly more instances than required and causing regional CPU quota exhaustion errors. Which operational adjustment should you make to stabilize the autoscaling behavior?

Show answer & explanation

Answer: Set the autoscaler cool-down period (initialization period) to at least 240 seconds so the MIG waits for newly created instances to complete startup before evaluating scaling metrics again.

Answer

Configure the cool-down period (initialization period) of the Managed Instance Group autoscaler to at least 240 seconds (4 minutes) to account for application warm-up time.
The correct option is setting the autoscaler cool-down period to at least 240 seconds. When virtual machines require time to initialize and warm up caches, the autoscaler must ignore their metric contributions during that period. Setting the cool-down period to match the 4-minute application startup time prevents the MIG from over-provisioning instances while waiting for existing new instances to become ready.

Step-by-Step Solution

1
Analyze the operational issue causing instance over-provisioning.
The application takes 4 minutes (240 seconds) to warm up, but the autoscaler evaluates CPU load every 60 seconds. Unready instances cannot accept load, causing high average CPU utilization across existing ready instances and triggering unnecessary scale-out actions.
Autoscaling metrics must account for instance startup and initialization time.
2
Identify the Google Cloud Compute Engine MIG configuration parameter designed to address application warm-up delays.
The cool-down period (also known as the initialization period) specifies how long the autoscaler should wait after a new instance is started before including its metric data in scaling decisions.
Setting cool-down 240\ge 240 seconds ensures metrics from booting instances are ignored until they are fully functional.
3
Evaluate alternative choices against Google Cloud operational best practices.
Changing metrics without warm-up delays, switching to Spot VMs, or adding zonal MIGs fails to resolve the metric timing issue and violates quota management procedures.
Only adjusting the initialization cool-down directly fixes the metric misconfiguration cause.

Key Concept

Compute Engine Managed Instance Group Autoscaler Cool-Down Period
Estimated Time:3m 0s
Question 878Question

A cloud operations team needs to establish automated cost governance for a Google Cloud project. They want email notifications sent to project billing admins when spending hits 80%80\% of the monthly budget. Additionally, when spending reaches 100%100\%, they require a custom Cloud Function to automatically execute and disable non-essential resources. Which setup represents the Google Cloud recommended approach?

Show answer & explanation

Answer: Create a Cloud Billing budget with threshold rules for email alerts, and configure a Cloud Pub/Sub topic on the budget to trigger the Cloud Function when threshold limits are met.

Answer

Create a Cloud Billing budget with threshold rules for email alerts, and configure a Cloud Pub/Sub topic on the budget to trigger the Cloud Function when threshold limits are met.
Google Cloud Billing budgets provide built-in threshold alerts via email and integrate natively with Cloud Pub/Sub. To perform automated actions like shutting down resources, the budget must publish messages to a Pub/Sub topic, which triggers a Cloud Function or Cloud Run service to execute the required remediation logic.

Step-by-Step Solution

1
Define the Cloud Billing budget scope and threshold triggers.
Email alert rules are set at 80%80\% and 100%100\% of actual or forecasted costs.
Budgets generate alerts based on specified percentage thresholds of target spend.
2
Attach a Cloud Pub/Sub topic to the Cloud Billing budget notification settings.
Budget alert events publish JSON messages containing cost details to the Pub/Sub topic whenever thresholds are breached.
Pub/Sub integration allows programmatic subscribers to act on billing events.
3
Configure the Cloud Function with a Pub/Sub trigger pointing to the billing topic.
The Cloud Function executes custom code to stop or cap compute resources when receiving a threshold message indicating 100%100\% spend.
GCP billing budgets do not stop billing automatically; custom programmatic logic via Pub/Sub and serverless execution is required for automated remediation.

Key Concept

Programmatic Budget Notifications via Pub/Sub and Cloud Functions
Estimated Time:1m 30s
Question 879Question

Your organization is deploying a public web application hosted on a Compute Engine instance group. You have configured a Global External Application Load Balancer and created a Google-managed SSL certificate for your custom domain `app.example.com`. However, after deploying the target HTTPS proxy and forwarding rule, the SSL certificate status remains in `PROVISIONING` and clients cannot establish secure HTTPS connections. What configuration step must be completed to finalize domain ownership verification and successfully provision the managed SSL certificate?

Show answer & explanation

Answer: Create an A or AAAA record in your Cloud DNS public zone that resolves the domain name to the load balancer's external IP address.

Answer

Creating an A or AAAA record in the Cloud DNS public zone that points the domain to the Global External Application Load Balancer's external IP address is required to complete Google-managed SSL certificate provisioning.
For a Google-managed SSL certificate to transition from PROVISIONING to ACTIVE status, Google must verify domain ownership. This is accomplished when an A or AAAA record in Cloud DNS maps the target domain name directly to the external IP address of the Global External Application Load Balancer frontend.

Step-by-Step Solution

1
Identify the external IP address reserved for the Global External Application Load Balancer's frontend forwarding rule.
The target IP address for domain DNS resolution is confirmed.
Google-managed certificates require incoming traffic on the domain to route to the load balancer for domain validation.
2
Configure an A record (or AAAA record for IPv6) in Cloud DNS for the domain pointing to the load balancer's external IP address.
Public DNS propagates the mapping between the custom domain and the load balancer IP.
Google automatically issues the certificate once DNS resolution points to the load balancer IP address and CAA checks pass.
3
Verify that the certificate status transitions from PROVISIONING to ACTIVE.
HTTPS traffic can now be successfully offloaded at the Global External Application Load Balancer.
Active managed SSL certificates automatically attach to the target HTTPS proxy for TLS termination.

Key Concept

Google-Managed SSL Certificate Provisioning and Cloud DNS Routing
Question 880Question

An enterprise security policy requires that a new high-throughput Cloud SQL for SQL Server database instance named `sql-fin-db` be deployed in the `us-east1` region. The database must be completely isolated from the public internet by disabling public IP address assignment and enabling Private IP connectivity over an existing VPC network named `corp-vpc`. Which `gcloud` command correctly provisions this managed database instance in full compliance with these security rules?

Show answer & explanation

Answer: gcloud sql instances create sql-fin-db --database-version=SQLSERVER_2019_STANDARD --tier=db-custom-4-16384 --region=us-east1 --network=corp-vpc --no-assign-ip

Answer

The command starting with `gcloud sql instances create sql-fin-db` that includes both `--network=corp-vpc` and `--no-assign-ip` correctly provisions the managed database instance with Private IP connectivity while preventing public IP allocation.
The correct command uses `gcloud sql instances create` to deploy a managed Cloud SQL instance, sets `--network=corp-vpc` to enable internal network connectivity via Private Services Access, and explicitly specifies `--no-assign-ip` to disable public IP address allocation, fulfilling all security mandates.

Step-by-Step Solution

1
Identify the managed database deployment service and CLI tool group
Use `gcloud sql instances create` specifically for Cloud SQL instance creation rather than `gcloud compute instances create`.
Cloud SQL is a fully managed relational database service in GCP requiring `gcloud sql` commands.
2
Configure internal private networking
Pass the `--network=corp-vpc` parameter.
This establishes private IP connectivity over the Private Services Access connection peered with the `corp-vpc` network.
3
Enforce public internet isolation
Include the `--no-assign-ip` flag.
By default Cloud SQL instances receive an external public IP; specifying `--no-assign-ip` ensures no public IP address is assigned to the database.

Key Concept

Deploying Cloud SQL Instances with Private IP and Disabling Public IP
PreviousPage 44 / 80Next
All practice questions — Google Cloud Associate Cloud Engineer | Examkin