An organization runs a production application on an existing Standard Google Kubernetes Engine (GKE) cluster. The data science team needs to deploy a batch data processing job that is stateless, fault-tolerant, and designed to handle sudden instance terminations gracefully. To minimize compute expenses, management requests running this batch job on cost-optimized infrastructure without risking the availability of existing critical stateful workloads running on standard nodes. Which deployment strategy should the Cloud Engineer execute to satisfy these requirements?
- Create a dedicated node pool configured with Spot VMs using gcloud container node-pools create with the --spot flag, apply node taints to the pool, and add corresponding tolerations in the batch job manifest.Answer
- BCreate a dedicated node pool configured with Spot VMs using gcloud container node-pools create with the --spot flag, and migrate the existing stateful database workloads onto this new pool to maximize cluster-wide cost savings.
- CMigrate the entire GKE cluster to GKE Autopilot mode, because GKE Autopilot automatically converts all standard node pools to Spot instances by default without requiring workload manifests.
- DExecute gcloud config set container/use_spot true to modify node types at the cluster level, and then re-fetch cluster credentials using kubectl config set-context.
Answer
Create a dedicated node pool configured with Spot VMs using gcloud container node-pools create with the --spot flag, apply node taints to the pool, and add corresponding tolerations in the batch job manifest.
Spot VMs are designed for fault-tolerant and stateless batch processing. Provisioning a dedicated Spot node pool with node taints ensures cost minimization for the batch processing job while protecting critical stateful workloads from being scheduled on preemptible nodes.
Step-by-Step Solution
Key Concept
GKE Spot Node Pools and Workload Scheduling Isolation