How do you run workloads on spot instances safely?
IntermediateScenarioResources, autoscaling and scheduling
Answer
Situation read → Compute cost must drop by 50% for stateless services.
What I'd do →
- Run multiple instance types and AZs in the node group or NodePool
- Taint spot nodes and tolerate them only in interruption-tolerant workloads
- Handle SIGTERM with a graceful shutdown (spot gives two minutes)
- Use PDBs and enough replicas
- Keep a baseline on on-demand capacity
Why → Spot is reclaimed with short notice, so the design must tolerate loss.
Interview tip → Mention the AWS Node Termination Handler or Karpenter's interruption handling.
More on Resources, autoscaling and scheduling
How do you choose requests and limits for a new service?BeginnerPods are Pending with `0/6 nodes are available: 6 Insufficient cpu`. What do you do?IntermediateExplain QoS classes and which pods get evicted first.IntermediateCPU limits cause latency spikes though average usage is low. Why and what is the fix?IntermediateHow do you configure an HPA on CPU?BeginnerHPA shows `<unknown>/70%` for CPU. What do you do?Intermediate