Reference / CLI
upgrade
These docs describe Kix's main branch, which can include changes not yet released. Read the docs for the latest release.
kix upgrade upgrades a project, a Kix library input, or a single cluster to a
newer version of Kix. It builds the affected clusters with their current
version, updates the version pin or cluster assignment, and builds those
clusters again. Then it compares the two builds and lists the release notes
that apply.
kix upgrade runs in the Kix version you invoke directly, even when
flake.lock pins another version. For each version it tests, it installs that
version of Kix if needed and runs the build with it. It does not contact any
cluster.
Synopsis
Section titled “Synopsis”1kix upgrade [NAME] [--to <VERSION or INPUT>] [--dry-run]2kix upgrade --acknowledge <ID>...Arguments and flags
Section titled “Arguments and flags”| Argument or flag | Default | Description |
|---|---|---|
[NAME] | kix | Optional. In projects with a [versions] table in kix.toml, an input name from [versions] (or kix) or a cluster name. Projects without [versions] accept only kix (or no name). |
--to <VERSION or INPUT> | latest for kix; the kix input’s version for another input; kix for a cluster | When upgrading an input, sets the target version: an exact release (0.10.2), a full prerelease (0.11.0-rc.1), a minor series (0.10, choosing its newest release), or latest (the newest non-prerelease). Inputs with no locked version or no clusters are pinned without building. When NAME is a cluster, --to names the target input, which must appear in [versions] (or be kix). |
--dry-run | false | Print what the upgrade would do and the release notes that apply, and change nothing. |
--acknowledge <ID>... | none | Acknowledge a change to stored data by its id or name, so that kix deploy goes ahead. Does nothing else. |
kix upgrade has three forms:
| Command | What it does |
|---|---|
kix upgrade | Upgrades the kix input to the newest release (or --to). Builds every cluster in the project, or only the clusters under kix when kix.toml defines [versions]. |
kix upgrade kix-stable | Upgrades the kix-stable input to match kix (or --to <VERSION>), and builds only the clusters under kix-stable. Also locks a new input not yet in flake.lock. |
kix upgrade prod --to kix | Moves the cluster prod to the kix input in kix.toml. --to names an input in [versions] (or kix, the default when omitted). |
An input other than kix cannot advance past kix. When --to names a newer
version than kix pins, Kix changes nothing and exits 1:
1Cannot upgrade input `kix-stable` to Kix 9.3.0: input `kix` pins Kix 9.2.0, and `kix` must pin the newest version in the project.2No project files were modified.3Next: run `kix upgrade` to upgrade `kix` first.If an earlier upgrade stopped unfinished (after a build failure or a pending
manual edit), running a different kix upgrade command fails and prints the
command needed to finish that upgrade.
The version the project uses
Section titled “The version the project uses”kix upgrade reads the version the project is on from the tag of the kix
input in flake.lock, such as v0.10.0. When --to names that version, it
prints this, fetches nothing, and exits 0:
1Already on Kix 0.10.0. Nothing to upgrade.Without --to, when the newest release is not newer than the project’s
version, it prints this and exits 0:
1Already on the latest Kix release (0.12.1). Nothing to upgrade.kix upgrade does not move a project to an older version. When --to names
an older version, or a minor whose newest release is older, it changes no
files and exits 1:
1Cannot move this project to Kix 0.10.0-rc.2: it is on Kix 0.10.0-rc.3, and `kix upgrade` only moves a project to a newer version.2No project files were modified.3Next: to go back to Kix 0.10.0-rc.2, restore flake.nix and flake.lock from a commit that pinned it.Pin a project that has no version
Section titled “Pin a project that has no version”A project or input has no pinned Kix release when flake.lock is missing, when
an input in flake.nix is not in flake.lock yet, when the input URL has no
tag (such as github:kix-run/kix), or when the input tracks a branch or commit.
With no previous release to build and compare against, kix upgrade --to 0.10.0
(or kix upgrade <input>) pins the input without building. Plain kix upgrade
pins kix to the newest release. Inputs in [versions] with no clusters are
likewise pinned without building.
Kix writes v0.10.0 into the input’s URL in flake.nix when needed, adding a
tag or replacing a branch or commit, and creates or updates flake.lock
without building:
1Pinned the Kix library to 0.10.0 (updated flake.nix, flake.lock). This project's flake.lock pinned no version of Kix before, so Kix built nothing to compare.2Commit flake.nix and flake.lock.A local folder has no versions, so Kix cannot pin it:
1Input `kix` points to the local folder `../kix`, which has no release tags. Set `inputs.kix.url` in flake.nix to a release tag such as `github:kix-run/kix/v0.10.0`.Kix matches each url attribute in flake.nix to its input
(inputs.<name>.url = "...", or url = "..." inside <name> = { ... }) and
updates only the target input’s URL, leaving other inputs untouched even when
they point to the same repository and tag. If flake.nix has multiple matching
URLs and Kix cannot tell which input owns them, Kix changes nothing, prints the
matching lines, and asks you to edit the URL yourself. With --dry-run, Kix
prints what it would pin and changes nothing.
Release notes
Section titled “Release notes”Every release of Kix publishes structured release notes beside its release
archives, as kix-<version>-changes.json, listed in the release’s signed
SHA256SUMS. kix upgrade fetches the notes of every release after the
project’s version up to the target and checks each file against
SHA256SUMS. A release made before structured release notes existed has
none, and the first run of an upgrade says so:
1Note: Kix 0.9.1 has no release notes; see CHANGELOG.md.kix upgrade --dry-run lists every breaking, security, and upgrade note in
the range, and every release that every cluster must deploy, grouped by what
you must do. Added, changed, and fixed notes are counted. It changes
nothing:
1Kix 0.10.0 -> 0.12.1 (preview, no files changed)2
36 changes between 0.10.0 and 0.12.1:4 * package used in this project (6 clusters)5
6 Config changes required (will fail the build until updated):7 * [K0003] caddy (0.11.0): `replicaCount` was renamed to `replicas`.8 [K0005] echo-server (0.11.0): `port` was renamed to `servicePort`.9
10 Behavior & data changes (builds cleanly, requires review before deploy):11 [K0009] (0.11.0): Cluster-wide default network policy mode now drops12 unmatched egress traffic in namespaces with at least one workload.13 * [K0007] harbor (0.12.0, moves stored data): Registry blob metadata moved14 to v2 layout; existing PVCs are migrated in place on first start.15 Requires `kix upgrade --acknowledge K0007` before `kix deploy`.16
17 Security fixes (builds cleanly, recommended for this upgrade):18 * [K0008] caddy (0.11.2, CVE-2026-4102): Fixes HTTP/2 CONTINUATION frame19 flood.20 Without upgrading: Set `caddy.http2 = false` in the cluster.21
22 Notes:23 * [metrics-port] caddy (0.11.2): Admin metrics endpoint now binds to24 127.0.0.1:2019 by default.25
26 14 minor feature and bugfix changes between 0.10.0 and 0.12.1 are not shown (see CHANGELOG.md).27
28`kix upgrade` will stop for [K0003], [K0005] until you make the config changes above.29Next: run `kix upgrade`.A note names packages, and Kix sees only the instance names a cluster uses
(from kix list packages <name>, run with the project’s current Kix). So Kix cannot tell which notes affect a project. It lists them all,
and marks with * a note whose package name equals the name of an instance
in use. An unmarked note can still affect an instance with another name.
When the current Kix is not installed, the preview marks nothing. When the
range has no breaking, security, or upgrade notes, it says
No breaking, security, or upgrade notes between 0.10.0 and 0.12.1.
What a run does
Section titled “What a run does”-
Builds every cluster on the target input (or every cluster in the project when
kix.tomlhas no[versions]table) with its current Kix version, and exports manifests with Kix annotations into~/.cache/kix/upgrade/<project>/before/(or a subdirectory for that input). If any cluster fails to build,kix upgradeexits1; fix the build on the current version first. -
Pins the input to the target version, installs that Kix release, and builds those clusters again. Pinning updates the tag in the input’s URL in
flake.nix(such asgithub:kix-run/kix/v0.9.1or?ref=refs/tags/v0.9.1) and locks it inflake.lock. Kix matches eachurlattribute inflake.nixto its input (inputs.<name>.url = "...", orurl = "..."inside<name> = { ... }) and updates only the target input’s URL. Ifflake.nixhas multiple matching URLs and Kix cannot tell which input owns them, Kix changes no files, prints the matching lines, writesedit-neededtokix-upgrade.json, and exits3before installing the target; update the input’s URL yourself and run the command again. If Nix cannot lock the new tag, or the project evaluates with a mismatched Kix library version, Kix restoresflake.nixandflake.lock, prints the error, and exits1or3. -
When a cluster does not build with the target, takes one minor release at a time: the newest patch of each minor after the project’s, ending with the target. A project on a prerelease, such as
0.9.0-rc.1, takes the newest release of its own minor first. It stops at the first release a cluster does not build with, prints the end of each error and that release’s matching config changes, keeps each cluster’s full build output in a log file, leaves the project pinned to that release, and exits1:1Building 6 clusters with Kix 0.12.1... failed (dev)2Stepping one minor release at a time (0.11.2 -> 0.12.1):3Building 6 clusters with Kix 0.11.2... failed (1 of 6 failed: dev)45Cluster dev:6error: The option `packages.experimental.caddy.replicaCount` does not exist.7Full build log: ~/.cache/kix/upgrade/<project>/logs/0.11.2/dev.log89Matching change in Kix 0.11.0:10[K0003] caddy: `replicaCount` was renamed to `replicas`.1112Stopped at Kix 0.11.2 (step 1 of 2 toward 0.12.1).13flake.nix and flake.lock are pinned to 0.11.2 so you can fix this step first.14Next: fix the error above, then run `kix upgrade` to continue to 0.12.1.Fix the errors against that release, then run
kix upgradeagain. The next run reuses the builds from step 1 and the package list made then, tries that release again, and continues to the version the first run aimed at, such as the release candidate it named with--to. So does a run after an interruption, since Kix writeskix-upgrade.jsonbefore it first pins the project. If the cached builds from step 1 are missing, Kix stops with an error. Deletekix-upgrade.jsonand runkix upgradeagain; the comparison then starts from the version the project is pinned to now. -
Compares the first build with the last, cluster by cluster, and prints the objects added, removed, and changed. Clusters that changed the same way are printed together, with
+,~, and-for added, changed, and removed objects. A change is marked[review: <Kind>]when the object is a Secret, Role, ClusterRole, RoleBinding, ClusterRoleBinding, NetworkPolicy, CiliumNetworkPolicy, CiliumClusterwideNetworkPolicy, or Certificate, or an Ingress or Gateway whose TLS settings changed. -
Searches the files git tracks in the project for each command or flag a release note says was removed or changed, and prints
file:linefor each. It skipsflake.lock,CHANGELOG.md,changes/, and files over 1 MB. -
Removes each version of Kix it installed only to build with, keeping the version the project used and the version it is now pinned to. It says so only with
-v. -
Writes
kix-upgrade.jsonin the project, and ends with what to review before you deploy:1Upgraded to Kix 0.12.1, but review before deploying:21. 3 Secrets changed in cluster prod (Secret/harbor-core@registry,3Secret/harbor-exporter@registry, Secret/harbor-jobservice@registry).42. 5 objects changed in clusters dev, prod; read the changes above, or run5`kix plan <cluster>`, before you deploy.63. [K0007] moves stored data in harbor. Once you are ready for the7migration, unblock deploy with:8kix upgrade --acknowledge K0007Any object that changed in any cluster is on this list, and the run exits
3. Only when no object changed and nothing needs a review does it end withUpgraded to Kix 0.12.1. Ready to deploy.and exit0.
When a release between the project’s version and the target has a change
that every cluster must deploy before it upgrades further, the upgrade ends
at the newest patch of that release’s minor, and exits 3:
1Upgraded to Kix 0.11.2, but review before deploying:2 1. Kix 0.11.0 must be deployed to all clusters before continuing to 0.12.13 (`kix deploy` on 0.12.1 will refuse any cluster still on 0.10.0).4 flake.nix and flake.lock are pinned to 0.11.2.5Next: commit this 0.11.2 step and deploy every cluster with `kix deploy <cluster>`, then run `kix upgrade` to continue to 0.12.1.kix deploy refuses a
cluster that would skip the release.
Move a cluster between inputs
Section titled “Move a cluster between inputs”In a project with a [versions] table in
kix.toml,
kix upgrade <cluster> [--to <input>] moves one cluster from its current input
to another input listed in [versions] (or kix, the default when --to is
omitted).
Kix builds the cluster on its current input’s version, moves the cluster to the
target input in kix.toml, rebuilds the cluster on the target input’s version,
compares the two builds, and shows the release notes between the two versions.
flake.nix and flake.lock stay unchanged. Output includes:
1Cluster `west`, from input `kix-stable` to input `kix`2Moved cluster `west` to input `kix` on Kix 9.2.0 (updated kix.toml)When nothing changed and nothing needs review, the run ends with
Moved cluster `west` to Kix 9.2.0 (input `kix`). Ready to deploy.
and exits 0. When an object changed or a note requires review, it ends with
Moved cluster `west` to Kix 9.2.0 (input `kix`), but review before deploying:
and exits 3.
If the cluster fails to build on the new version, Kix leaves it listed under
the target input in kix.toml so you can fix the build, saves
kix-upgrade.json, and exits 1:
1kix.toml now lists cluster `west` under `kix` (Kix 9.2.0) so you can fix the build.Fix the build and run kix upgrade west --to kix again. Kix reuses the cached
baseline build and finishes the comparison.
Other rules when moving a cluster:
- Target input in
[versions]:<input>must be listed in[versions](an empty list such askix-next = []counts), or bekix. An input present only inflake.lockis refused. To add a new version input, setinputs.<input>.urlinflake.nixand<input> = []inkix.toml[versions], runkix upgrade <input>to lock it, and then runkix upgrade <cluster> --to <input>. - Newer versions only: A cluster can move only to an input that pins a newer version. Moving to an input on an older version is refused.
- Same version or development input: When both inputs pin the same version,
or either input points to a local folder or branch, Kix updates
kix.tomlwithout building and notes why it skipped build comparison. - Required stops: When a release between the two versions must be deployed
first, Kix refuses the move without changing files and tells you to run
kix upgrade <from-input> --to <release>, deploy, and then move the cluster. - Direct edits: You can also edit
[versions]inkix.tomldirectly. No upgrade review runs; usekix plan <cluster>to see what deploying will change.
Changes to stored data
Section titled “Changes to stored data”A change that moves or reinterprets stored data with no error goes into
kix-upgrade.json. Until someone acknowledges it, kix deploy blocks any
cluster that the upgrade built, prints the note, and shows the command to run:
1Deploy blocked: upgrade to Kix 0.12.1 includes an unacknowledged data migration.2No clusters were contacted.3
4 [K0007] (0.12.0, moves stored data):5 Registry blob metadata moved to v2 layout; existing PVCs are migrated in6 place on first start.7
8Next: once you are ready for this migration, run:9 kix upgrade --acknowledge K000710Then run `kix deploy` again.kix upgrade --acknowledge K0007 records the acknowledgement in
kix-upgrade.json:
1Acknowledged K0007 in kix-upgrade.json. You can now run `kix deploy`.kix deploy --dry-run and kix plan are not blocked.
Another kix upgrade also refuses until each change is acknowledged.
This check reads kix-upgrade.json, so it protects only a project that was
upgraded with kix upgrade and kept the file. A project whose pins were
moved by hand gets no refusal. Commit kix-upgrade.json with the upgrade.
kix-upgrade.json
Section titled “kix-upgrade.json”| Field | Meaning |
|---|---|
schema | kix.run/upgrade/v1 |
from, to | The version the upgrade started from, and the version it moved to. |
requested | The --to value the upgrade started with. Absent when it moved to the latest release. A run that resumes without --to uses it. |
input | Optional. Flake input upgraded (omitted when upgrading kix), or target input when moving a cluster. |
cluster | Optional. Cluster moved between inputs (omitted when upgrading an input). |
clusters | Optional. Subset of project clusters built by this upgrade. |
status | done, fix-needed (a build failed, or the run stopped part of the way), edit-needed (manual edit needed in flake.nix or kix.toml), needs-person, or required-stop. |
steps | Each version the project was built with: version, result (ok, failed, or started for a step that stopped before it built), and failed, the clusters that did not build. |
records | The ids (or names, for a note without an id) of the release notes that apply, by kind. |
dataChanges | The changes to stored data: reference, release, and body. |
acknowledged | The data changes someone acknowledged with --acknowledge. |
sensitiveChanges | How many changed objects are sensitive. |
cliHits | Each project line that uses a changed command or flag: text, file, line. |
before | The directory of the builds made with the version the upgrade started from. |
packageIdsInUse | Built-in package IDs installed across the project’s clusters (such as harbor or experimental/coredns), reported by the Kix version the upgrade started from. Omitted when that version does not report package IDs or could not list packages. |
Programs that read the file must skip fields they do not know.
Environment
Section titled “Environment”| Variable | Effect |
|---|---|
KIX_RELEASE_SOURCE | A site laid out like kix.run to fetch releases from, such as an internal mirror. See kix self. |
XDG_CACHE_HOME | The builds go under $XDG_CACHE_HOME/kix/upgrade/ in place of ~/.cache/kix/upgrade/. |
Exit status
Section titled “Exit status”0when the upgraded clusters build cleanly on the target version with no manifest changes or items requiring review, and on--dry-runor--acknowledge.1when the release index or release notes cannot be fetched or verified, a version cannot be installed, the input or cluster cannot be upgraded, or a cluster fails to build on its current version or a target version.3when the upgrade needs your attention: either the run paused for a manual edit toflake.nixorkix.toml, or the upgraded clusters built on the target version with items to review before deploying (manifest changes, sensitive resource changes, behavior or data migrations, or a required intermediate deploy).