mediumMultiple ChoiceObjective-mapped
Google ACE Practice Question: A gaming company's GKE cluster uses a mix of node…
A gaming company's GKE cluster uses a mix of node pools: a standard on-demand pool for stateful database pods, and a Spot VM pool for compute-intensive but fault-tolerant game simulation pods. The simulation pods occasionally get preempted. How should the Deployment be configured to route simulation pods to the Spot pool only?
⚠ Common exam trap
A common mix-up: candidates confuse `nodeSelector` with `podAffinity` or assume GKE uses naming conventions or resource requests to determine node pool placement, when in fact it relies on node labels and taints.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Add a nodeSelector: cloud.google.com/gke-spot: 'true' to the simulation Deployment spec
GKE uses the node label `cloud.google.com/gke-spot` to identify Spot VMs. Adding a `nodeSelector` with that exact key-value pair ensures the simulation Deployment is scheduled exclusively on Spot nodes, which is the intended behavior for fault-tolerant, preemptible workloads.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Set podAffinity to prefer nodes where Spot pods are running
Why it's wrong here
Using a podAffinity that *prefers* nodes where Spot pods are already running does not reliably or exclusively target Spot node pools. Pod affinity matches nodes based on pod labels, not node labels, and it only influences placement relative to existing pods; if no Spot pods exist yet, the preference is ignored. Even when it does match, the affinity is only a soft preference (`preferredDuringSchedulingIgnoredDuringExecution`), so the scheduler can still place the pod on a regular node. To pin scheduling to Spot nodes, you need a node-level constraint, not a pod-to-pod relationship.
- ✓
Add a nodeSelector: cloud.google.com/gke-spot: 'true' to the simulation Deployment spec
Why this is correct
Adding `nodeSelector: cloud.google.com/gke-spot: 'true'` is the precise way to ensure the Simulation pod lands on a Spot node. When a node pool is created with Spot VM settings, Google Kubernetes Engine automatically labels every node with `cloud.google.com/gke-spot=true`. A nodeSelector constrains the pod's scheduling to nodes that carry that exact label, which is a hard constraint during the scheduling decision. This directly targets the Spot pool without relying on ambiguous affinity logic or naming conventions.
- ✗
Set requests.cpu and requests.memory to very high values — GKE will route them to Spot nodes
Why it's wrong here
Inflating the Deployment's resource requests does not signal GKE to use Spot nodes. Resource requests and limits are used by the Kubernetes scheduler to determine which existing nodes have enough allocatable CPU and memory to fit the pod; they are never interpreted as a node-pool preference. In fact, very high requests could make the Simulation pod unschedulable if no node has that much capacity, or force the cluster to autoscale a non-Spot pool. To target Spot VMs, you must explicitly use scheduling constraints such as a nodeSelector or nodeAffinity for the Spot label.
- ✗
Name the simulation Deployment with a 'spot-' prefix — GKE routes prefixed deployments to Spot pools
Why it's wrong here
Prefixing the Deployment name with `spot-` has no effect on the Kubernetes scheduler or GKE node pool selection. Deployment names are arbitrary metadata used for identification and labeling, and GKE does not inspect prefixes to infer workload placements. Node assignment is controlled exclusively through scheduling directives in the pod spec, such as `nodeSelector`, `nodeAffinity`, `taints`, and `tolerations`. Naming conventions may help humans organize resources, but they never influence infrastructure routing.
Go deeper
Related to this question
Learn chapter
Google Cloud Platform Overview
Key term
GKE
GKE is Google's managed Kubernetes service that automates deploying, scaling, and managing containerized applications in the cloud.
Key term
Route
A route is a path that data takes through a network from one device or network to another, determined by routing protocols and configured rules.
About these practice questions
This ACE question is part of Courseiva's 769-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This ACE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the ACE exam.