cub variant delete
cub variant delete
Delete a variant and its configuration
Synopsis
Delete a variant: the space that holds it, with every unit and other entity in it.
The variant is named as
A base is not deleted while deployments cloned from it remain: their units still point at its units as their upstream. The error names them. Delete the deployments first, or pass --detach to delete the base anyway and leave the clones without an upstream.
A deployment on a cluster wired with "cub cluster up" or "cub cluster attach" is taken off the cluster first: its Argo CD Application unit, Flux OCIRepository and Kustomization unit, or Sveltos ClusterProfile unit, is deleted from the cluster's apps space and the apps space's release republished, then, once the cluster's root has applied that release, the Application, Kustomization or ClusterProfile is deleted with everything it deployed. --orphan deletes it and leaves what it deployed running. The cluster is reached through its kubeconfig, so this has to run on the machine that wired the cluster; elsewhere the unit is still deleted, and the command prints what is left in the cluster and how to remove it. On a Sveltos cluster, whose root deletes the ClusterProfile on its own, a delete the root would not carry out as asked is refused instead.
Examples:
# Delete a deployment
cub variant delete web/dev
# Delete a deployment, leaving what Argo CD deployed for it running
cub variant delete --orphan web/dev
# Delete the base after its deployments are gone
cub variant delete web/base
# Delete a base whose deployments stay, detaching them from it
cub variant delete --detach web/base
cub variant delete <variant> [flags]
Options
--detach Remove the references other entities have to what is deleted, instead of refusing the delete while any remain
--force delete the variant's units even if some have delete gates
-h, --help help for delete
--orphan for a deployment on a cub cluster, delete its Argo CD Application, Flux Kustomization or Sveltos ClusterProfile but leave what it deployed running
-o, --output string Output format. One of: json, yaml, name, wide, mutations, jq=<expr>, yq=<expr>, custom-columns=<spec>
--quiet No default output.
--verbose Detailed output, additive with default output
Options inherited from parent commands
--context string The context to use for this command
--debug Debug output
SEE ALSO
- cub variant - Variant commands