Autoscaling a Spot Node Pool

Bids for capacity in Spot create node pools in a Kubernetes cluster, and any one of these node pools can be selected to autoscale dynamically based on workload requirements.

Cloudspaces use the Kubernetes Cluster Autoscaler

Cluster autoscaling in Kubernetes relies on the Cluster Autoscaler project.

The autoscaler continuously inspects the workloads and nodes that are a part of the Cloudspace (Kubernetes cluster).

When it finds pods that failed to schedule on any of the current nodes due to insufficient resources, it initiates a scale up event to add the required amount of capacity via additional nodes.

Similarly, when it finds nodes that are no longer needed, it initiates a scale down event to remove the excess capacity.

Spot makes Autoscaling easy

Autoscaling your Cloudspace is as simple as checking a box in the Spot UI, or specifying the "autoscaling" parameters to the Spot terraform provider. Spot does the rest, including:

  1. Deploying and configuring the Cluster Autoscaler, which includes a server component and a client component
  2. Integrating the Cluster Autoscaler with the underlying node provisioning mechanism
  3. Ongoing monitoring and upgrades to the autoscaler components

Enabling Autoscaling In Your Cloudspace

Via the User Interface

To use autoscaling via the user interface, launch the bid user interface and select the bid that you would like to scale and enable autoscaling. You will need to specify the minimum and maximum number of nodes that the pool should scale to:

Currently, Spot only allows any one bid to be selected for autoscaling.

Via Terraform

In your Terraform configuration, specify the autoscaling section:

  1. enabled = true
  2. min_nodes = minimum number of nodes required to autoscale down to
  3. max_nodes = maximum number of nodes to autoscale up to
Terraform
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard