Change how many nodes a worker pool runs on a live cluster. Keep the pool at a fixed size that you set, or autoscale it. An autoscaled pool adds and removes nodes by itself as its CPU or memory use changes, between a minimum and a maximum that you set. The cluster stays Ready throughout, and only the pool’s own status changes.
Choose a fixed size for steady work you have already sized, and autoscaling for work whose load rises and falls during the day.
Before you begin
Section titled “Before you begin”- A worker pool in the Ready state, on an hourly plan, in a cluster that is Ready or Worker Joined. A committed pool keeps its size until its term ends; see Manage committed plans.
- A role with the update permission on Kubernetes. See Roles and permissions.
- On a prepaid account, enough credit for any nodes you add. TIR checks your credit and the free capacity for the added nodes.
Open the resize dialog
Section titled “Open the resize dialog”- Open the cluster’s details page and select the Node Pool tab.
- On the pool’s row, select Resize or autoscale worker pool.
There are two ways to size the pool, Static resize and Autoscale, and the one the pool uses now is chosen. Current pool configuration gives the pool’s size, plan, and cost. Nodes you add use the same configuration and pricing model as the pool’s other nodes.
Removing nodes evicts the pods running on them, and the removed nodes take their local disk with them. Before you lower a pool’s size or its autoscaling bounds, make sure your workloads have replicas on other nodes. Keep their data on a persistent volume, which outlives any one node, rather than on a node’s own disk. See Use persistent volumes.
Set a fixed size
Section titled “Set a fixed size”Choose Static resize to keep the pool at exactly the number of nodes you set.
- Under Static resize, enter the Desired number of nodes, from 1 to 25. It starts at the current count plus one. New Estimated Pool Cost gives what the pool will cost at that size.
- If the new number is lower than the current count, TIR says how many nodes it will remove. Removing them evicts their pods.
- Select Resize Pool.
TIR queues the resize. The pool is Resizing until it reaches the new size, and then Ready.
To turn autoscaling off, use Static resize on the autoscaled pool. It starts at the current count, and saving it, even unchanged, replaces the autoscaling with a fixed size.
Turn on autoscaling
Section titled “Turn on autoscaling”Choose Autoscale to let the pool follow its CPU or memory use. The pool runs as many nodes as its busiest target asks for, within its minimum and maximum.
-
Set Minimum nodes, from 1 to 24, and Maximum nodes, from 2 to 25. The maximum must be higher than the minimum. The first time you autoscale a pool, the minimum starts at the pool’s current count and the maximum at two more, up to 25.
-
Under Utilization Based, turn on CPU utilization, Memory utilization, or both, and set each one’s Target %, from 20 to 90. The defaults are 70 for CPU and 80 for memory. At least one must be on.
Each target is the average use across the pool’s nodes. The pool adds nodes while use stays above the target and removes them while it stays below, at the pace that Scaling Speed sets. Memory in use excludes page cache.
-
(Optional) Under Scaling Speed, set how quickly the pool follows its targets. Leave the defaults unless the pool needs to react faster or more slowly:
Field Range Default Polling interval 15 to 300 seconds 30 seconds Scale-up stabilization window 0 to 3,600 seconds 0 seconds Scale-down stabilization window 0 to 3,600 seconds 300 seconds Polling interval is how often the pool checks its CPU and memory use. A shorter interval notices new demand sooner.
Scale-up stabilization window is how long use must stay above the target before the pool adds nodes, so the pool rides out brief spikes. At the default of 0, the pool adds nodes as soon as use goes above the target.
Scale-down stabilization window is how long use must stay below the target before the pool removes nodes. A longer window keeps nodes through short drops in demand.
-
Check the pool’s cost At minimum and At maximum. If the new bounds would take nodes away, TIR says how many. Lowering the maximum removes the nodes above it and evicts their pods. While use stays low, the pool can drop to its minimum.
-
Select Autoscale Pool, or Save Changes on a pool that is already autoscaled.
On the Node Pool tab, the pool now has a range of nodes instead of a fixed count. While it adds or removes nodes, the pool is Scaling, and you can change its size again once it finishes.
Check the new size
Section titled “Check the new size”On the Node Pool tab, open the pool. Once its status is back to Ready, it lists the new
number of nodes, each in the Ready state. To check from your machine, run kubectl get nodes
with the cluster’s kubeconfig.
The pool now runs at the size you chose, or follows its targets between its bounds. Once a pool has settled at a size you expect to keep, you can move it to a committed plan; see Manage committed plans. If the Autoscale panel says autoscaling is not available, or a pool stays on Resizing or Scaling, see Troubleshooting TIR Kubernetes.