Vultr Cluster Autoscaler
Vultr Cluster Autoscaler is a Vultr-owned, Vultr-only distribution of
Kubernetes Cluster Autoscaler. It scales
autoscaling-enabled node pools in Vultr Kubernetes Engine (VKE) while consuming the
provider-independent autoscaler core as a Go module.
This repository replaces the in-tree cloudprovider/vultr implementation. The binary
registers only the Vultr provider, so --cloud-provider defaults to vultr and can be
omitted.
Requirements
- Go 1.26 or newer
- A VKE cluster
- A Vultr API token with access to the cluster
- Autoscaling enabled, with minimum and maximum sizes configured, on each VKE node pool
that Cluster Autoscaler should manage
Build
make build
The default build creates a Linux binary named cluster-autoscaler. To build for the
host platform during development:
make build GOOS="$(go env GOOS)" GOARCH="$(go env GOARCH)"
Run the test suite and compile verification with:
make verify
Build a container image with:
make image IMAGE=registry.example.com/vultr/cluster-autoscaler TAG=dev
Configuration
The --cloud-config flag must point to a JSON file containing the VKE cluster ID and
Vultr API token:
{
"cluster_id": "00000000-0000-0000-0000-000000000000",
"token": "your-vultr-api-token"
}
The provider discovers every node pool in the cluster that has Vultr autoscaling
enabled. Node pool minimum and maximum sizes are read from the Vultr API, so -nodes
and --node-group-auto-discovery are not used.
Example Kubernetes resources are in examples. Update the image and secret
values before applying them:
kubectl apply -f examples/cluster-autoscaler-secret.yaml
kubectl apply -f examples/cluster-autoscaler-deployment.yaml
Core dependency
The provider implementation and release lifecycle live in this repository. Generic
autoscaling behavior comes from sigs.k8s.io/cluster-autoscaler, pinned in go.mod.
Kubernetes module replacements are intentionally kept aligned with that core version.
When upgrading core, upgrade the Kubernetes modules and test the provider as one change.
The upstream core currently selects registered providers by name. For that reason the
binary still exposes --cloud-provider, but Vultr is the only registered value and is
the default.
Limitations
- Node auto-provisioning is not supported; Cluster Autoscaler does not create or delete
VKE node pools.
- Scaling from zero requires template node information, which the Vultr provider does
not currently implement.
- Pricing and GPU type discovery are not implemented.
License
Apache License 2.0. See LICENSE.