Skip to main content
Ankra-provisioned clusters on Hetzner, OVHcloud, UpCloud, DigitalOcean, Scaleway, AWS EC2 and Ankra Cloud (both k3s and kubeadm; Scaleway and Ankra Cloud are in closed beta) can automatically scale worker node groups based on pod demand. Ankra runs the upstream Kubernetes Cluster Autoscaler inside your cluster and wires it to the Ankra platform, which provisions and removes the actual cloud servers. When pods are unschedulable because a node group is full, the autoscaler adds nodes (up to the group’s max). When nodes sit underutilised and their pods fit elsewhere, it drains and removes them (down to the group’s min), respecting PodDisruptionBudgets throughout.

How it works

Autoscaling is configured per node group with three settings: Behind the scenes:
  1. The Cluster Autoscaler runs in your cluster and watches for unschedulable pods and underutilised nodes.
  2. It talks to the Ankra agent in-cluster (over mutual TLS), which forwards scaling decisions to the Ankra platform.
  3. The platform creates or drains/deletes the actual cloud servers through the same provisioning pipeline used for manual scaling - every change shows up as an operation and an audit entry attributed to cluster-autoscaler.
Scale-down drains nodes before removal and honours PodDisruptionBudgets. Scale-up clones the group’s existing worker configuration (instance type, labels, taints).
Enabling autoscaling requires a recent ankra-agent (the platform tells you the minimum version if the cluster’s agent is too old). The Cluster Autoscaler itself is installed automatically the first time you enable autoscaling on any group - no manual Helm work needed.

Enable at cluster creation

On the Configuration step of Add a cluster, tick Scale this group automatically on a node group and set At least and At most. The node count becomes the group’s initial count and must lie within the bounds. The box appears only for providers that keep the range at create time. Via the API, include an autoscaling object per node group:

Enable on an existing cluster

In the portal

Changing autoscaling needs clusters.write on the cluster (Member, Operator, Admin or Owner).
1

Open the node group

Go to Infrastructure → Clusters → <your cluster> → Kubernetes → Nodes, click Manage nodes and groups, then Inspect and edit on the group.
2

Set the bounds

Open the Autoscaling tab, tick Enable autoscaling and set Minimum nodes and Maximum nodes. The page says “Ankra adjusts the node count between these limits as workloads need capacity.”
3

Confirm

Click Review change, then Confirm change. The first enable on a cluster installs the Cluster Autoscaler (plus metrics-server).Check: Current settings reads Autoscaling with your range, and the group’s row on Node management shows the same range.
While autoscaling is on, the Node count tab is disabled: “Disable autoscaling before changing the fixed count.” To turn autoscaling off, untick Enable autoscaling on the same tab; the group keeps its current requested count.

Via the CLI

The cloud provider is detected automatically from the cluster. The command prints what the new bounds do to the group’s node count and, once an operation has started for it, that operation’s id, which you can follow with ankra cluster operations list <operation_id>. With --wait it follows that operation until it ends, and fails with the operation’s status and recorded error if it does not succeed. --timeout defaults to one hour for this command, because nodes leave one at a time.

Via the API

When the group is outside the new bounds

The platform moves a group that is outside the bounds you set to the nearest count inside them:
  • More nodes than Max. The group scales down to Max. The least busy nodes go first, and each one is cordoned, waits up to 15 minutes for the pipeline steps running on it, and is then drained behind its PodDisruptionBudgets, one node at a time.
  • Fewer nodes than Min. The group scales up to Min, the way a manual scale-up adds nodes.
A group already inside the bounds keeps its node count, and so does a group you turn autoscaling off for. The move runs as an operation on the cluster: when another operation is already working on the cluster it starts once that one finishes, and on a stopped cluster the group starts with the new count.

Interaction with manual scaling

Per-group manual scaling stays available while autoscaling is enabled, but the requested count is clamped into [min, max] - you cannot manually push an autoscaled group outside its bounds. The legacy whole-cluster worker scale (ankra cluster scale) is refused while any group is autoscaling-enabled, since it removes workers across all groups indiscriminately. To take full manual control again, disable autoscaling first. New nodes added by the autoscaler carry the group’s labels and taints, plus the canonical ankra.cloud/node-group label Ankra uses to track group membership.

Behaviour details

  • Scale-down is conservative by default: a node must be unneeded for ~10 minutes, and scale-down pauses for 10 minutes after any scale-up.
  • Failed provisioning is self-healing: if a cloud server fails to create or join, the autoscaler is told about the failure and backs off; stuck half-created servers are garbage-collected automatically.
  • Node upgrades and autoscaling do not fight: a node the autoscaler is draining for removal is skipped by Kubernetes version upgrades.
  • Control planes are never autoscaled - only worker node groups.

Scale a group to zero

A Min of 0 lets the autoscaler remove every node of a group while nothing needs it, and add one again when a pod needs the group. Set it with the CLI or the API; the portal refuses it with “Self-managed autoscaling requires at least one node.”
When you lower the floor to zero, the platform records a template of the group’s nodes, so the autoscaler can simulate a new node once the group is empty. The platform refuses the zero floor when:
  • The cluster’s agent is older than 2.1.1081, or has not reported its version yet: “Autoscaling min_count 0 (scale-to-zero) requires ankra-agent 2.1.1081 or newer (cluster runs <version>); upgrade the agent first”. Upgrade it on Settings → Agent.
  • The platform cannot size the group’s instance type, so it has no template to keep.

Limitations

  • Autoscaling is not available on Proxmox VE and HPE Morpheus clusters. The portal says Ankra cannot add or remove their workers by itself; set the node group’s count instead.
  • Deleting a node group removes its autoscaling settings with it.
  • The cluster’s pod range caps the whole cluster. A cluster created with a network identity holds at most 64 nodes, control planes included (see Network ranges and their limits). A Max that would let the groups grow past that is refused when you set it, and a scale-up the autoscaler asks for past it is refused, so the autoscaler backs off instead of adding a node that could never become Ready.