Question

Difficulty: HardDeploying and Managing Google Kubernetes Engine (GKE) Clusters and Workloads

A data engineering team is deploying a high-throughput, fault-tolerant batch processing pipeline to Google Kubernetes Engine (GKE). The batch worker pods are stateless and can tolerate immediate termination when compute capacity is reclaimed. However, the cluster must also host a stateful database service that requires uninterrupted availability and persistent disk storage to prevent data corruption. To optimize operational costs while guaranteeing stability for the critical component, which cluster deployment strategy should be implemented?

  1. Provision a GKE Standard cluster with separate node pools: a Spot VM node pool with node selectors and tolerations for batch workers, and a standard node pool for the stateful database.Answer
  2. B
    Deploy both the batch workers and the stateful database onto a single node pool provisioned entirely with Spot VMs to maximize overall cost savings.
  3. C
    Configure the Horizontal Pod Autoscaler (HPA) on the cluster to dynamically convert standard nodes into Spot VM nodes whenever batch processing workload demands surge.
  4. D
    Deploy a GKE Autopilot cluster and run `gcloud config set compute/zone` to enforce that node provisioning excludes preemptible instances for all deployed workloads.

Answer

Provision a GKE Standard cluster with separate node pools: a Spot VM node pool with node selectors and tolerations for batch workers, and a standard node pool for the stateful database.
GKE Standard clusters support multiple heterogeneous node pools. Placing fault-tolerant batch workloads on a Spot VM node pool drastically reduces compute costs, while placing the stateful database on a standard node pool protects it from sudden preemption.

Step-by-Step Solution

1
Analyze the availability and resilience requirements of each workload component.
Identified batch workers as fault-tolerant (stateless) and the database service as critical and non-fault-tolerant (stateful).
Spot VMs offer significant cost savings but are subject to sudden preemption, making them ideal for stateless batch jobs but dangerous for stateful systems.
2
Evaluate GKE node pool configuration options to isolate compute properties.
GKE Standard allows creating multiple node pools with distinct machine types and provisioning models (Spot vs. Standard).
Dedicated node pools ensure that specific workloads only run on hardware meeting their operational criteria.
3
Apply Kubernetes scheduling constraints (nodeSelectors, taints, and tolerations).
Batch worker pods target the Spot VM node pool via nodeSelectors and tolerations, while database pods schedule onto standard nodes.
Prevents critical database pods from landing on Spot nodes while allowing batch workloads to leverage cheaper capacity.

Key Concept

Workload Isolation with GKE Node Pools and Spot VMs
Rate this question