Skip to content

cub cluster down

cub cluster down

Tear down a kind cluster (optionally its ConfigHub config too)

Synopsis

Tears down the live cluster: deletes the kind cluster and removes the local kubeconfig/env file. By default the ConfigHub side is left in place — the cluster Space with its worker and OCI target, the apps Space holding the Argo Application Units, and any deployment Spaces bound to the target. That config outlives the cluster and can be re-applied to a new one, so tearing down the live cluster does not throw it away.

Pass --delete-config to also delete that config: down removes every Space whose release target is the cluster's OCI target (the apps Space, the argobot variant Space, and any deployment variant Spaces), then the cluster Space itself. The cluster Space is deleted last because ON DELETE RESTRICT blocks deleting its target while those Spaces still reference it. This is destructive and includes your deployment variant Spaces — it deletes their config, not just the live cluster.

Looks up the cluster's Space in the current cub context (via the confighub.com/cluster-name annotation) to confirm the cluster is cub-managed and to report what it leaves behind. If no matching Space is found, fails with an "are you in the right context?" hint; pass --force to delete the local kind cluster + kubeconfig anyway.

cub cluster down [flags]

Options

      --delete-config   also delete the ConfigHub config: the cluster's spaces (worker, target, apps, argobot, and deployment variants bound to the target). Destructive.
      --force           delete the local kind cluster + kubeconfig even if no matching ConfigHub Space is found in the current context
  -h, --help            help for down
      --name string     cluster name (required)

Options inherited from parent commands

      --context string   The context to use for this command
      --debug            Debug output

SEE ALSO

  • cub cluster - Manage local kind clusters wired into ConfigHub