Back to Practice
Lab

Horizontal Pod Autoscaling

Let the cluster size a workload for you: give a Deployment CPU requests, then attach a HorizontalPodAutoscaler that scales it between a floor and a ceiling on CPU utilisation.

Your mission

A HorizontalPodAutoscaler watches a metric — classically CPU utilisation — and adds or removes Pod replicas to keep it near a target, between a floor and a ceiling you set. The one hard requirement: the Pods must declare resource requests, or there's no baseline to compute "utilisation" against.

You'll give a Deployment CPU requests and attach an HPA, in apps.

kubectl config set-context --current --namespace=apps

Skills you'll put into practice

autoscalingschedulingcka

Make it your own.

Use this topic as a starting point for a fresh custom scenario.

Create a variation