cub cluster down
cub cluster down
Tear down a kind cluster that up created (optionally its ConfigHub config too)
Synopsis
The inverse of "cub cluster up": detaches the cluster from ConfigHub, deletes the kind cluster, and removes the local kubeconfig, env file and record. For a cluster that "cub cluster attach" wired in, which cub did not create, use "cub cluster detach" instead; down refuses it.
By default the ConfigHub side is left in place — the cluster Space with its OCI target and k8sbot's Channel, the apps Space holding the Argo Application Units (or, for a --controller sveltos cluster, the Sveltos ClusterProfile Units, and for a --controller flux cluster, the Flux OCIRepository and Kustomization Units), any deployment Spaces bound to the target, and the cluster's service account. 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 k8sbot variant Space, and any deployment variant Spaces), then the cluster Space itself, then the service account. The cluster Space is deleted after the others 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.
The cluster's record (written beside its kubeconfig by up) says which ConfigHub server and organization it is wired to, and down acts there, whichever cub context is current. A cluster from before records existed is looked up in the current context instead. If no Space is found, down fails with an "are you in the right context?" hint; pass --force to delete the local kind cluster and files anyway.
cub cluster down <name> [flags]
Options
--delete-config also delete the ConfigHub config: the cluster's spaces (target, channel, apps, k8sbot, and deployment variants bound to the target) and its service account. Destructive.
--force delete the local kind cluster and files even if no matching ConfigHub Space (or context for the cluster's record) is found
-h, --help help for down
Options inherited from parent commands
--context string The context to use for this command
--debug Debug output
SEE ALSO
- cub cluster - Manage clusters wired into ConfigHub via Argo CD, Sveltos or Flux