Skip to content
kix /docs
Install the CLI

Reference CLI

migrate

One-off cluster migrations: move a cluster's Kix records from the retired `kix.dev` API group to `kix.run`.

kix migrate holds one-off migrations of a cluster’s Kix records. It has one subcommand, domain, which moves Activation records from the retired kix.dev API group to kix.run. Kix refuses to operate on a cluster whose records are still under the old group until this has run.

This page is hand-maintained. Check cli/kix-cli/src/cli.rs and cli/kix-cli/src/commands/migrate.rs when in doubt.

kix migrate domain <CLUSTER> [--dry-run] [-y] [--flake <FLAKE>] [--context <CONTEXT>]
Argument or flagMeaning
<CLUSTER>Cluster name. Kix builds it to get the current CRD manifests.
--dry-runPrint the plan and stop.
-y, --yesSkip the confirmation prompt. Required when stdin is not a terminal.
--flake, --contextSee Global flags.
  1. Builds the cluster and reads the Kix CRDs from the build.
  2. Prints the plan. A cluster with nothing under the old group reports “Nothing to do” and exits.
  3. Copies every Activation record to the new group with its spec, status and history, and checks each copy by name and phase.
  4. Clears the operator finalizer from the old records, waits, and reads them back. If a finalizer returns, an operator is still running, and the command stops having deleted nothing.
  5. Deletes the old CRDs.

PackageInstance records are not copied; the next deploy re-creates them.

Before running it on a cluster with the Kix operator, scale the operator to 0. Afterwards, upgrade the operator image, scale it back up, and run kix deploy. That deploy applies every resource once to move its annotations.

The command is safe to repeat. A second run skips records it already copied and repairs a copy whose status did not land.

❱ kix migrate domain demo --dry-run
❱ kix migrate domain demo --yes
CodeMeaning
0Migrated, nothing to do, or the prompt was declined
1Confirmation was needed on a non-interactive terminal, a running operator was detected, or a build or cluster error