Skip to main content

astroctl infra kubernetes delete

Delete a k8s cluster

Synopsis

Delete a k8s cluster.

This destroys the cluster itself and everything the platform recorded about it, including its cost history — on every plan and regardless of your retention setting. Cost history cannot be recovered, and creating a cluster with the same name later does not restore it. Export it first if you need it:

astroctl infra k8s cost allocation <name> --window 30d -o json > cost.json
astroctl infra kubernetes delete [flags]

Examples


# Delete a k8s cluster
astroctl infra k8s delete my-cluster

# Delete a k8s cluster with automatic confirmation
astroctl infra k8s delete my-cluster --yes

# Delete a k8s cluster by cluster name
astroctl infra k8s delete -c <cluster-name> where <cluster-name> is the name of the cluster

Options

-c, --cluster-name string The cluster name to delete
-y, --confirm Confirm the cluster deletion (default true)
-h, --help help for delete
--yes Skip all confirmations (useful for automation)

Options inherited from parent commands

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

SEE ALSO