From the course: Certified Kubernetes Administrator (CKA) Cert Prep

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Configuring autoscaling

Configuring autoscaling

- In this video we'll explore autoscaling. Autoscaling is happening through the HorizontalPodAutoscaler which is its own API resource. So the purpose of this HPA or HorizontalPodAutoscaler is to manage autoscaling of workloads. And it works based on usage statistics that have been gathered by the metric server. So you cannot do autoscaling if you don't have a metric server. If configured, it will add pod instances after a specific threshold has been passed. And when the observed value drops below the threshold, after a period of five minutes, by default, the applications will be scaled down. That's a parameter that you can manage by the way. Let's try to understand the HPA and let me run a demo where you can see how it works. In this demo, I'm first going to install the metric server. Then we are going to use kubectl top to observe that the metric server is indeed gathering metrics. And then I'm starting a deployment and we use HBA to manage the number of instances in the deployment…

Contents