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.
- Apply a node taint to the Spot VM node pool and configure matching tolerations on the batch data processing Pod specification.Answer
- Configure nodeSelector or nodeAffinity rules on the batch data processing Pod specification to explicitly target the Spot VM node pool labels.Answer
- CConfigure a Horizontal Pod Autoscaler (HPA) target on the Spot VM node pool to automatically add Compute Engine nodes when pending Pods accumulate.
- DAdd Spot VM tolerations to the payment microservice Pod specification so it can spill over to Spot nodes during peak traffic events.
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
Key Concept
Workload Isolation in GKE using Taints, Tolerations, and Node Affinity
Estimated Time:2m 0s