Skip to content

cub cluster detach

cub cluster detach

Remove a cluster's ConfigHub wiring and leave it running

Synopsis

The inverse of "cub cluster attach". The cluster is left running and Argo CD left installed; what goes is the wiring:

  • every Argo Application that came from the apps Space — the root app-of-apps and the child Applications — is deleted WITHOUT cascading, so the workloads they deployed stay;
  • argobot, cub's own bot, is deleted with its resources;
  • the registry credentials Secret is deleted;
  • the local kubeconfig, env file and record are removed.

By default the ConfigHub side is left in place — the cluster Space with its OCI target and argobot's Channel, the apps Space holding the Argo Application Units, any deployment Spaces bound to the target, and the cluster's service account. That config outlives the attachment and can be re-attached to a cluster later, so detaching does not throw it away.

Pass --delete-config to also delete that config: detach 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, then the service account. This is destructive and includes your deployment variant Spaces — it deletes their config, not just the wiring.

The cluster's record (written beside its kubeconfig by attach) says which ConfigHub server and organization it is wired to, and detach acts there, whichever cub context is current. Without the kubeconfig — on a machine other than the one that attached the cluster — the in-cluster cleanup is skipped and reported, and the ConfigHub side is still handled. For a kind cluster that "cub cluster up" created, use "cub cluster down", which also deletes it.

cub cluster detach <name> [flags]

Options

      --delete-config   also delete the ConfigHub config: the cluster's spaces (target, channel, apps, argobot, and deployment variants bound to the target) and its service account. Destructive.
      --force           proceed even if no matching ConfigHub Space (or context for the cluster's record) is found
  -h, --help            help for detach

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