3 Keys for Successful Autoscaling Kubernetes
While technology teams are sometimes able to predict when their applications will be stressed with extra traffic or activity, building resilient applications that can react to any amount of pressure at any given time is what application teams strive for. In Kubernetes-based platforms, different autoscaling approaches enable you to update your workloads, enabling your applications to react to changes in resource demands.
Benefits of Autoscaling
Before we look at how to set your environment up for successful autoscaling, let’s look at some of the benefits of why you might want to implement autoscaling in your Kubernetes environment:
- Cost Reduction. When you have automated the autoscaling process, you can save on compute resources by not having pods running unnecessarily, which can drive up cost.
- Faster Disaster Recovery. With an automated autoscaling process/approach in place, you can more quickly react to disruptions to your system.
- Compute Resource Reduction. Cloud computing requires massive amounts of energy and resources to run. When you use autoscaling, you can be better stewards of the energy that you’re using.
Approaches to Autoscaling in Kubernetes
There are three different approaches to autoscaling in Kubernetes. These include vertical pod autoscaling (VPA), horizontal pod autoscaling (HPA), and event-driven autoscaling with KEDA.
Keys for Successful Autoscaling in Kubernetes
- Testing – to properly determine the configuration settings for scaling, performance tests must be executed in a non-production environment. Use existing production metrics as a guide to configure your load, while also considering potential future increases
- Choose the best metric(s) – during your performance testing, look to see what metrics correlate with degradation in the application as load increases and where bottlenecks might exist
- Setup Event-driven scaling – using the open-source Kubernetes Event-driven Autoscaling (KEDA) project, you can setup and drive the scaling of your application based on the most relevant metrics
Kubernetes Autoscaling Deep Dive & Demo
If you are attending KubeCon + CloudNativeCon in Atlanta, join my talk on Thursday at 11AM in room B406b-407. I will be covering horizontal pod autoscaling (HPA) configuration and behavior, KEDA features, and conducting a demo of autoscaling a Spring Boot application utilizing Micrometer metrics via the Prometheus Scaler in Kubernetes.
KubeCon + CloudNativeCon North America 2025 is taking place in Atlanta, Georgia, from November 10 to 13. Register now.