Skip to main content

astroctl infra kubernetes spec

Get the specification of a cluster

Synopsis​

Prints the cluster's specification in the shape 'apply' takes, credential values left out.

It is the specification the cluster was created with, kept up to date by each update for its node groups and Kubernetes version. Provider settings changed by a K8sClusterUpdate (for example amiFamily or releaseChannel) and its tags may still show their values from create.

Edit it and apply it back with 'astroctl infra k8s update prod-01 -f update.yaml': only what you change is sent.

Terminal
astroctl infra kubernetes spec [cluster-name] [flags]

Examples​

Terminal

# Get the specification of a cluster using positional argument
astroctl infra k8s spec my-cluster

# Get the specification of a cluster using flag
astroctl infra k8s spec -c my-cluster

# Get the specification in JSON format
astroctl infra k8s spec my-cluster -o json

# Get the specification in YAML format
astroctl infra k8s spec my-cluster -o yaml

# Edit it and apply it back
astroctl infra k8s spec my-cluster > my-cluster.yaml
astroctl infra k8s update my-cluster -f my-cluster.yaml --dry-run

Options​

Terminal
-c, --cluster-name string The cluster name for which you want to get the specification
-h, --help help for spec
-o, --output string Output format (json|yaml) (default "yaml")

SEE ALSO​