gcluster destroy

NAME

gcluster destroy - destroys all resources in a Cluster Toolkit deployment directory.

SYNOPSIS

gcluster destroy DEPLOYMENT_DIRECTORY [FLAGS]

DESCRIPTION

The gcluster destroy command destroys all resources managed by the specified deployment directory. It typically tears down infrastructure in the reverse order of creation. For more information about deploying resources, see gcluster deploy.

FLAGS

  • -a, --artifacts ARTIFACTS_DIR: The directory where deployment artifacts are stored. This directory is automatically configured if not set.
  • --auto-approve: Automatically approve destruction without prompting.
  • --skip: A comma-separated list of group names to skip during destruction.
  • --only: A comma-separated list of group names to destroy exclusively. This value can't be used with --skip.
  • --robust: Perform a robust destroy, including firewall rule cleanup and retries on GKE cluster reachability issues.

EXAMPLES

To destroy all resources in a deployment directory:

gcluster destroy ./my-deployment

To automatically approve and destroy resources without prompting:

gcluster destroy ./my-deployment --auto-approve

To destroy only a specific group within the deployment directory:

gcluster destroy ./my-deployment --only=primary-cluster

To perform a robust destroy, cleaning up residual firewall rules:

gcluster destroy ./my-deployment --robust --auto-approve