astroctl infra kubernetes scale
Scale a node group
Synopsis
Scale a node group's minimum and maximum node count.
For complex updates (provider-specific settings, multiple changes), use:
Terminal
astroctl infra k8s update prod-01 -f update.yaml
Terminal
astroctl infra kubernetes scale <cluster-name> [nodegroup-name] [flags]
Examples
Terminal
# List node groups in a cluster
astroctl infra k8s scale my-cluster --list
# Scale node group ng-1 to min 3, max 10
astroctl infra k8s scale my-cluster ng-1 --min 3 --max 10
# Scale with dry-run to preview
astroctl infra k8s scale my-cluster ng-1 --min 5 --max 20 --dry-run
# Scale to zero: the group drains when idle and the autoscaler brings
# nodes back when a pod cannot be placed (not supported on eks)
astroctl infra k8s scale my-cluster ng-1 --min 0 --max 10
# Undo a scale-to-zero
astroctl infra k8s scale my-cluster ng-1 --min 1 --max 10
# Scale only minimum (keeps current max)
astroctl infra k8s scale my-cluster ng-1 --min 3
# Scale only maximum (keeps current min)
astroctl infra k8s scale my-cluster ng-1 --max 10
# Scale with rolling update controls
astroctl infra k8s scale my-cluster ng-1 --min 5 --max 20 --max-surge 2 --max-unavailable 1
# Scale with percentage-based rolling update
astroctl infra k8s scale my-cluster ng-1 --min 10 --max 50 --max-surge 25% --max-unavailable 10%
# Apply a node group at the sizes it has, so AstroPulse labels its nodes
# and creates resources the cluster is missing
astroctl infra k8s scale my-cluster ng-1 --min 1 --max 3 --reapply
Options
Terminal
--dry-run Preview scaling without applying changes
-h, --help help for scale
--list List available node groups in this cluster
--max int Maximum number of nodes (default -1)
--max-surge string Max nodes created above desired during rolling update (e.g. '2' or '25%')
--max-unavailable string Max nodes unavailable during rolling update (e.g. '1' or '10%')
--min int Minimum number of nodes (default -1)
--reapply Apply the node group even when its sizes are unchanged, so AstroPulse labels its nodes and creates resources the cluster is missing (replaces the nodes on a self-hosted cluster)
Options inherited from parent commands
Terminal
-o, --output string Output format (table|json|yaml) (default "table")
SEE ALSO
- astroctl infra kubernetes - Manage Kubernetes clusters