Skip to content

cub cluster up

cub cluster up

Create a kind cluster and attach it to ConfigHub, via Argo CD, Sveltos or Flux

Synopsis

Creates a local kind cluster and attaches it: "cub cluster create" followed by "cub cluster attach --provider kind", which sets up the controller, the cluster and apps Spaces, the service account, the gated OCI target, the root app-of-apps and k8sbot. See "cub cluster attach --help" for what attaching sets up; this help covers what "up" adds. Unlike a cluster attached by hand, one "up" brings up is torn down again with "cub cluster down".

The kind node gets a window of host ports mapped through: the first is the controller UI's NodePort, so Argo CD is at http://localhost: (server.insecure=true) with no port-forward; the rest are free for your own NodePort Services. --no-ports reserves only the UI's. The window and the UI port are recorded as annotations on the cluster Space, which is how "cub cluster open" finds the UI.

Admin credentials are written to /clusters/.env for source-ing into your shell along with KUBECONFIG and CUB_CONTEXT.

With --controller sveltos, Sveltos is installed instead of Argo CD, and the apps Space is -sveltos-apps. Its root Unit is a ClusterProfile that pulls the apps Space's own Release and deploys it to the management cluster, so each ClusterProfile Unit added there, pulling a deployment Space's Release, becomes a profile Sveltos runs; "cub variant create --target" adds one per deployment. k8sbot is installed in its Sveltos mode, from its own base Space ("k8sbot-sveltos-base"): on each deploy it redeploys the matching profile, and it reports live status from Sveltos health reports. Sveltos also polls each Release itself, as a fallback: every 10 minutes with k8sbot, every minute with --no-k8sbot, where polling is all there is. The Sveltos dashboard is reachable at http://localhost:, and logs in with a token from the platform-admin ServiceAccount.

With --controller flux, Flux is installed instead, and the apps Space is -flux-apps. Its root Unit is an OCIRepository and Kustomization, both named confighub-root, that pull and apply the apps Space's own Release, so each Unit added there, holding an OCIRepository and Kustomization that pull and apply a deployment Space's Release, becomes a deployment Flux runs; "cub variant create --target" adds one per deployment. k8sbot is installed in its Flux mode, from its own base Space ("k8sbot-flux-base"): on each deploy it requests a reconciliation of the matching OCIRepository, and it reports live status from the Kustomizations. The OCIRepositories also poll for a new Release themselves: every 10 minutes with k8sbot, every minute with --no-k8sbot. Flux has no UI; the whole NodePort window is left for your apps, and "kubectl -n flux-system get ocirepository,kustomization" shows Flux's state.

Use --mount HOST[:CONTAINER] (repeatable) to bind-mount host directories into the cluster node.

--prune lets the controller delete what a removed deployment deployed; see "cub cluster attach --help". With Flux it does the same with Kustomizations: by default neither the root Kustomization nor a deployment's prunes, and --prune turns prune on for the root and for every deployment "cub variant create --target" adds later. Sveltos cannot be kept from deleting: its root always deletes a deployment's ClusterProfile whose Unit leaves the apps space, and a profile always deletes a resource that leaves its Release. By default a deployment's ClusterProfile has stopMatchingBehavior LeavePolicies, so deleting it leaves what it deployed running; --prune drops that, so what it deployed is withdrawn.

"cub cluster down" deletes the kind cluster again; the ConfigHub side is kept unless --delete-config is given.

cub cluster up [<name>] [flags]

Options

      --controller string           controller to install and wire to ConfigHub: argo (Argo CD), sveltos (Sveltos) or flux (Flux) (default "argo")
      --controller-version string   controller release to install (default: argo stable, sveltos v1.16.0, flux v2.9.2; Argo CD must be v3.1 or later, which oci:// sources need)
  -h, --help                        help for up
      --k8sbot-base string          what to do with k8sbot's shared base Space when it already exists: update (install k8sbot's newest release over it, then clone it) or clone (clone it as it is); asked when stdin is a terminal, otherwise update
      --k8sbot-installer            install k8sbot's shared base Space with ConfigHub's installer, from its installer package, rather than from the deployment its image carries; needs the installer cub plugin (cub plugin install confighub/installer)
      --mount stringArray           host:container bind mount (repeatable; container path defaults to /mnt/<basename>)
      --no-k8sbot                   skip installing k8sbot (the event-driven Argo CD sync, Sveltos redeploy, or Flux reconciliation, bot); 'cub cluster k8sbot-install' installs it later
      --no-placeholder-gate         skip the default vet-placeholders Trigger, allowing Releases with unfilled confighubplaceholder values to be published to this cluster
      --no-ports                    only reserve the controller UI's NodePort (none for Flux); skip the user-app NodePort window
      --prune                       let the controller delete what a removed deployment deployed: the root prunes deployments whose Units leave the apps space (Sveltos's always does), and deployments created later prune what they deployed
      --registry string             where to pull k8sbot's image from: ghcr, gcr, or a mirror prefix holding <prefix>/k8sbot, and <prefix>/packages/k8sbot for --k8sbot-installer (default ghcr)
      --space string                ConfigHub space slug for the cluster's target and k8sbot channel (the "target prefix"); the apps space is this slug + "-argo-apps", + "-sveltos-apps" with --controller sveltos, or + "-flux-apps" with --controller flux (defaults to <name>)

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