Description
This rule verifies that node pool autoscaling is enabled on DOKS clusters so the pool can automatically add nodes when workloads need capacity and remove them when demand falls, rather than staying pinned at a static size. It inspects each node pool's auto-scale flag and confirms sensible min-nodes and max-nodes bounds are set.
On DigitalOcean, autoscaling is configured per node pool with an auto-scale toggle plus a minimum and maximum node count. Without it, a demand spike can leave pods Pending because there is no spare capacity, while an over-provisioned fixed pool wastes money during quiet periods.
Node pools with autoscaling disabled (fixed count only).
Node pools where auto-scale is on but min and max are set equal, defeating the purpose.
Pools whose max-nodes ceiling is too low to absorb realistic demand.
Rationale
Fixed-size node pools force a trade-off between paying for idle headroom and risking unschedulable pods under load. Enabling the DigitalOcean cluster autoscaler lets the pool track real demand: it provisions nodes when pods cannot be scheduled and reclaims them when they become idle, improving both resilience to traffic spikes and cost efficiency.
Autoscaling also smooths operational events. When nodes are recycled during upgrades or failures, the autoscaler restores the pool toward its target automatically instead of requiring an operator to notice and resize.
Prevents Pending pods when load rises unexpectedly.
Reclaims idle nodes to control spend during low-demand periods.
Impact
Pros:
Capacity follows demand automatically, reducing both outages and waste.
Less manual toil resizing pools by hand.
Pairs well with surge upgrades and node failures by self-healing pool size.
Cons:
Scaling up costs money; a high max-nodes ceiling can produce a large bill under sustained load.
Autoscaler reactions are not instantaneous, so very bursty traffic may still see brief scheduling delays.
Requires thoughtful min/max bounds and resource requests on pods to behave correctly.
Default Value
Autoscaling is opt-in on DigitalOcean; node pools run at a fixed node count unless you set the auto-scale flag with min-nodes and max-nodes, so it is off by default.
Pre-Requisite
DigitalOcean Control Panel access with permission to manage Kubernetes clusters, or an API token / authenticated doctl.
Expected minimum and peak workload sizing to choose min-nodes and max-nodes.
Pods that declare CPU/memory resource requests so the autoscaler can make correct decisions.
Droplet quota headroom for the chosen max-nodes (default account limit 25 Droplets).
Remediation
Test Plan
Using the DigitalOcean Control Panel:
Sign in to cloud.digitalocean.com and open Kubernetes.
Select the cluster and open the Resources (Nodes) tab.
For each node pool, open the three-dot menu and choose 'Resize or Autoscale'.
Check whether the 'Autoscale' option is selected and whether a Minimum and Maximum are configured.
Pass: every node pool (that should scale) has Autoscale enabled with a min lower than a sensible max.
Fail: a node pool is set to a fixed size, or has autoscale enabled with min equal to max.
Using doctl or the API:
Read the auto_scale flag and bounds for each node pool. (doctl's --format has no AutoScale/MinNodes/MaxNodes columns, so read the full JSON with -o json.)
doctl kubernetes cluster node-pool list <cluster-id> -o json | jq '.[] | {name, auto_scale, min_nodes, max_nodes, count}'
curl -s -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://api.digitalocean.com/v2/kubernetes/clusters/$CLUSTER_ID/node_pools" | jq '.node_pools[] | {name, auto_scale, min_nodes, max_nodes}'
Pass if each node pool intended to scale has auto_scale = true with min_nodes < max_nodes. Fail if auto_scale = false, or min_nodes = max_nodes.
Implementation Steps
Using the DigitalOcean Control Panel:
In the cluster's Resources (Nodes) tab, open the node pool's three-dot menu and choose 'Resize or Autoscale'.
Select the 'Autoscale' option.
Set a Minimum and Maximum node count aligned with expected load (keep the minimum >= 2 for production).
Click Save and observe scaling events over the next demand cycle to validate the bounds.
Using doctl or the API:
Enable autoscaling with doctl or the node-pool update endpoint (PUT body requires the pool name).
doctl kubernetes cluster node-pool update <cluster-id> <pool-id> --auto-scale --min-nodes 2 --max-nodes 10
curl -s -X PUT -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" -H 'Content-Type: application/json' -d '{"name":"<pool-name>","auto_scale":true,"min_nodes":2,"max_nodes":10}' "https://api.digitalocean.com/v2/kubernetes/clusters/$CLUSTER_ID/node_pools/$POOL_ID"
Backout Plan:
Re-open 'Resize or Autoscale' (or call node-pool update).
Choose a fixed size, or run: doctl kubernetes cluster node-pool update <cluster-id> <pool-id> --auto-scale=false --count <n>.
Save; the pool reverts to a static node count.