Kubernetes Simulator
advanced · ~12 min
Launch-day traffic
Marketing is about to email every customer. Traffic will jump tenfold, and nobody knows exactly when.
A HorizontalPodAutoscaler watches the pods' CPU against what each one *requested* and changes the Deployment's replica count to hold a target — here, 50% of request. Measured against nothing, it can't do anything at all.
Objectives
- Autoscale orders between 2 and 8 pods at 50% CPU
- The autoscaler can read the pods' CPU
- Scale out for the launch: at least 6 ready pods
- Bonus: Watch it decide: kubectl get hpa or describe hpa after the spike
Best on a computer with a keyboard. It works on a phone, with shortcuts under the terminal.