Autoscaling
Chapter 5, Kubernetes Deployments showed us how to manually scale the number of Pod replicas. However, manually scaling a set of Pods does not scale (excuse the pun). As an example, if demand on your application spikes at 4:20 a.m. it's far from ideal if you need to page an operator who will then log on to the cluster and manually increase the number of replicas. The same applies if you need to scale the number of nodes to your cluster.
With these challenges in mind, Kubernetes offers several auto scaling technologies.
The Horizontal Pod Autoscaler (HPA) dynamically increases and decreases the number of Pods in a Deployment based on demand.
The Cluster Autoscaler (CA) dynamically increases and decreases the number of nodes in your cluster based on demand.
The Vertical Pod Autoscaler (VPA) attempts to right size your Pods, but it's currently an alpha product.
Horizontal Pod Autoscaler (HPA)
HPAs are stable resources in the autoscaling/v1
API group...