Skip to main content

astroctl infra kubernetes update

Update cluster configuration via YAML

Synopsis

Update cluster configuration via YAML file.

For K8s version upgrades:

astroctl infra k8s upgrade <cluster> --list-versions # See available versions
astroctl infra k8s upgrade <cluster> <version> # Upgrade

For K8s version rollback (node pools only, control plane cannot be downgraded):

astroctl infra k8s rollback <cluster> --list-versions # See rollback versions
astroctl infra k8s rollback <cluster> <version> # Rollback

For node group scaling:

astroctl infra k8s scale <cluster> --list # See node groups
astroctl infra k8s scale <cluster> <nodegroup> --min X --max Y

For complex/provider-specific updates, use this command with a YAML file.

VALID OPTIONS:

EKS amiFamily: AmazonLinux2023, Bottlerocket, Ubuntu2004, Ubuntu2204, Ubuntu2404, UbuntuPro2004, UbuntuPro2204, UbuntuPro2404
GKE imageType: COS, COS_CONTAINERD, UBUNTU, UBUNTU_CONTAINERD
GKE releaseChannel: RAPID, REGULAR, STABLE
AKS autoUpgrade: patch, stable, rapid, node-image, none
AKS nodeOsUpgrade: SecurityPatch, NodeImage, None, Unmanaged
Duration format: "4h", "6h30m" (min: 4h, max: 48h)
astroctl infra kubernetes update <cluster-name> [flags]

Examples

# Scale node groups
cat <<EOF | astroctl infra k8s update my-cluster -f -
apiVersion: platform.astropulse.io/v1
kind: K8sClusterUpdate
spec:
nodeGroups:
- name: ng-1
minNode: 3
maxNode: 10
EOF

# Upgrade Kubernetes version
cat <<EOF | astroctl infra k8s update my-cluster -f -
apiVersion: platform.astropulse.io/v1
kind: K8sClusterUpdate
spec:
kubernetesVersion: "1.31"
EOF

# GKE: Change image type and release channel
cat <<EOF | astroctl infra k8s update my-cluster -f -
apiVersion: platform.astropulse.io/v1
kind: K8sClusterUpdate
spec:
gke:
imageType: UBUNTU_CONTAINERD
releaseChannel: STABLE
EOF

# EKS: Change AMI family
cat <<EOF | astroctl infra k8s update my-cluster -f -
apiVersion: platform.astropulse.io/v1
kind: K8sClusterUpdate
spec:
eks:
amiFamily: Bottlerocket
EOF

# AKS: Update upgrade channels
cat <<EOF | astroctl infra k8s update my-cluster -f -
apiVersion: platform.astropulse.io/v1
kind: K8sClusterUpdate
spec:
aks:
autoUpgradeChannel: stable
nodeOsUpgradeChannel: NodeImage
EOF

# Dry-run (validate without applying)
astroctl infra k8s update my-cluster -f update.yaml --dry-run

# Show all YAML examples
astroctl infra k8s update my-cluster --example

Options

--auto-approve Skip confirmation prompt and apply updates immediately
--dry-run Perform a dry-run validation without applying changes
--example Show YAML examples for this cluster's provisioner
-f, --file string YAML file containing update configuration. Use '-' to read from stdin.
-h, --help help for update

Options inherited from parent commands

-o, --output string Output format (json|yaml) (default "yaml")

SEE ALSO