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:
- Deploying and configuring the Cluster Autoscaler, which includes a server component and a client component
- Integrating the Cluster Autoscaler with the underlying node provisioning mechanism
- 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:
- enabled = true
- min_nodes = minimum number of nodes required to autoscale down to
- max_nodes = maximum number of nodes to autoscale up to
# Creates a spot node pool with a two servers of class gp.vs1.medium-iad.
resource "spot_spotnodepools" "example" {
cloudspace_name = "your cloudspace name"
organization = "name of organization"
server_class = "gp.vs1.medium-iad"
bid_price = "your bid price"
# desired_server_count must not be specified for an autoscaling bid
# desired_server_count = 2
autoscaling = {
enabled = true
min_nodes = 2
max_nodes = 4
}
}