Illumina Innovates with Rancher and Kubernetes
The Horizontal Pod Autoscaler (HPA) is a Kubernetes feature that allows you to configure your cluster to automatically scale the services it’s running up or down. This section provides explanation on how HPA works with Kubernetes.
Using HPA, you can automatically scale the number of pods within a replication controller, deployment, or replica set up or down. HPA automatically scales the number of pods that are running for maximum efficiency. Factors that affect the number of pods include:
HPA improves your services by:
HPA is implemented as a control loop, with a period controlled by the kube-controller-manager flags below:
kube-controller-manager
--horizontal-pod-autoscaler-sync-period
30s
--horizontal-pod-autoscaler-downscale-delay
5m0s
--horizontal-pod-autoscaler-upscale-delay
3m0s
For full documentation on HPA, refer to the Kubernetes Documentation.
HPA is an API resource in the Kubernetes autoscaling API group. The current stable version is autoscaling/v1, which only includes support for CPU autoscaling. To get additional support for scaling based on memory and custom metrics, use the beta version instead: autoscaling/v2beta1.
autoscaling
autoscaling/v1
autoscaling/v2beta1
For more information about the HPA API object, see the HPA GitHub Readme.