Interview Prep/Kubernetes/Resources, autoscaling and scheduling

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 →

  1. Run multiple instance types and AZs in the node group or NodePool
  2. Taint spot nodes and tolerate them only in interruption-tolerant workloads
  3. Handle SIGTERM with a graceful shutdown (spot gives two minutes)
  4. Use PDBs and enough replicas
  5. 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.

All Kubernetes questions Roadmap: Kubernetes core

More on Resources, autoscaling and scheduling