- Spock
Usage of HorizontalPodAutoscaler (HPA) is one of the most critical aspects of making a resilient, fault-tolerant, and highly-available system. However, it is of no use if there are no nodes with available resources. When Kubernetes cannot schedule new Pods because there's not enough available memory or CPU, new Pods will be unschedulable and in the pending status. If we do not increase the capacity of our cluster, pending Pods might stay in that state indefinitely. To make things more complicated, Kubernetes might start removing other Pods to make room for those that are in the pending state. That, as you might have guessed, might lead to worse problems than the issue of our applications not having enough replicas to serve the demand.
Kubernetes solves the problem of scaling nodes through Cluster Autoscaler.
The logic behind Cluster Autoscaler is simple to grasp. We are yet to see whether it is simple to use as well.
Let's create a cluster (unless you already have one) and prepare it for autoscaling.