Skip to main content
Version: Next 🚧

Image sources

Install, upgrade and reset all deploy a system image from a source. A source is written as type:address, for example oci:repo/image:tag, and the same types work everywhere a source is accepted.

Source types​

TypeAddressWhat it is
ocirepo/image:tagAn image pulled from a container registry. If the tag is omitted, :latest is assumed.
ocifilePath to a local fileAn image archive already on the machine, such as the output of docker save. Docker and OCI layout archives both work.
dirPath to a local directoryAn already extracted root filesystem. /mnt, /proc, /sys, /dev, /tmp, /host and /run are not copied.
filePath to a single local fileA prebuilt filesystem image, copied as is. This is a low level type and is not the format docker save produces.
sshssh://[user@]host[:port][/path]The system image of another Kairos node, copied over SSH. See the ssh page.
p2pp2p://[peer[,peer]/]image?pin=<pin>Experimental. The system image of other Kairos nodes, downloaded from several of them at once. See the p2p page.

In a cloud config, an image reference without a type (quay.io/kairos/hadron:latest) and a docker: prefix are both read as oci. The --source flag does not accept either of those: it needs one of the type prefixes above.

Signature verification with cosign only runs for oci sources.

Sources from another node​

ssh and p2p take the image from other Kairos nodes instead of a registry or a file. Both work wherever the table below lists a source, with these differences:

sshp2p
Config blockssh-source, at the root of the cloud config or inside install, upgrade or reset (the block of the action wins, key by key)p2p-source, at the root of the cloud config only
Must be switched onNoYes, p2p-source.experimental: true (--experimental-p2p on upgrade)
AuthenticationYour ssh configuration, or identity-file, known-hosts-file and host-key-fingerprints of the blockThe source needs ?pin=<pin> (or ?sha256=<hash>), or p2p-source.insecure: true to go without
Recovery upgradeNot supported, only the active systemupgrade.recovery-system.source takes p2p://.../recovery, the active and passive images only go to the system
Trusted boot (UKI)Not supportedNot supported

kairos-agent reset has no --source flag for them: set reset.system.source, with the ssh-source or p2p-source block next to it. --source on the other commands takes ssh:// and p2p:// like any other type.

Where a source can be set​

ActionCommand lineCloud config
Upgradekairos-agent upgrade --source <source>upgrade.system.source
Recovery upgradekairos-agent upgrade --recovery --source <source>upgrade.recovery-system.source
Manual installkairos-agent manual-install --source <source>install.source or install.system.source
Interactive installkairos-agent interactive-install --source <source>install.source or install.system.source
Pairing installkairos-agent install --source <source>install.source or install.system.source
ResetNo flagreset.system.source

An install can also set the source of the passive and recovery images with install.passive.source and install.recovery-system.source. By default they are copies of the active image.

A reset without a source restores the image kept in the recovery partition.

A reset formats the persistent partition before it reads the image. A local source for a reset (ocifile, dir or file) must therefore not live on it: mount a disk in the recovery system, or use another type.

Examples​

One tab per source type, with the command line for each action and the cloud config that does the same. The cloud config blocks are independent of each other, keep the ones you need. <pin> is explained on the p2p page.

# Upgrade the active system
sudo kairos-agent upgrade --source oci:quay.io/kairos/hadron:v0.6.3-standard-amd64-generic-v4.7.0-k3s-v1.37.2-k3s1

# Upgrade the recovery system
sudo kairos-agent upgrade --recovery --source oci:quay.io/kairos/hadron:v0.6.3-standard-amd64-generic-v4.7.0-k3s-v1.37.2-k3s1

# Install from the live system, which erases the device: manual, interactive and pairing (QR code)
sudo kairos-agent manual-install --device auto --source oci:quay.io/kairos/hadron:v0.6.3-standard-amd64-generic-v4.7.0-k3s-v1.37.2-k3s1 cloud-config.yaml
sudo kairos-agent interactive-install --source oci:quay.io/kairos/hadron:v0.6.3-standard-amd64-generic-v4.7.0-k3s-v1.37.2-k3s1
sudo kairos-agent install --source oci:quay.io/kairos/hadron:v0.6.3-standard-amd64-generic-v4.7.0-k3s-v1.37.2-k3s1
#cloud-config

install:
system:
source: "oci:quay.io/kairos/hadron:v0.6.3-standard-amd64-generic-v4.7.0-k3s-v1.37.2-k3s1"

upgrade:
system:
source: "oci:quay.io/kairos/hadron:v0.6.3-standard-amd64-generic-v4.7.0-k3s-v1.37.2-k3s1"
recovery-system:
source: "oci:quay.io/kairos/hadron:v0.6.3-standard-amd64-generic-v4.7.0-k3s-v1.37.2-k3s1"

reset:
system:
source: "oci:quay.io/kairos/hadron:v0.6.3-standard-amd64-generic-v4.7.0-k3s-v1.37.2-k3s1"

For a registry that needs credentials or a certificate, see Private registry auth.

Trusted boot​

On trusted boot systems the source is copied into the EFI partition, so it has to hold the signed EFI artifacts, as the images built for trusted boot do.

  • Upgrade reads upgrade.system.source only. upgrade.recovery-system.source is not used, and --recovery takes its image from --source or upgrade.system.source.
  • file is not meant for trusted boot: it copies a single file, and trusted boot needs the whole set of EFI artifacts.
  • Reset has no source. It does not deploy an image.