How it works
Omni reads the CA certificates from the file set with--trusted-roots-file (trustedRootsFile in the configuration file) at startup. It adds them as a TrustedRootsConfig document named omni-trusted-roots to every join configuration it generates:
- installation media downloaded from the UI or with
omnictl - the install and upgrade images of the machines
- the join configuration handed to infrastructure providers
- the output of
omnictl jointoken machine-config - the configuration of machines in maintenance mode and of the machines in clusters
Requirements
Before you configure a custom CA, check the following:- Talos 1.12 or later for the boot media. Boot media for older Talos versions cannot carry the CA. Machines booting from such media cannot connect to a machine API served with a certificate from your CA. The UI warns when you pick such a version.
- Infrastructure providers get the CA depending on how they pass the join configuration to the machines:
- Providers that put the join configuration into the boot media (for example, libvirt) need no change.
- Providers that pass the join configuration as user data (KubeVirt, Proxmox, vSphere) need a release that supports it.
- The bare metal provider reads the CA from Omni at startup. Restart it after you set or change the CA in Omni.
- When an infrastructure provider downloads boot media from an Image Factory with a certificate from your CA, whatever downloads it must trust the CA too (for example, the Proxmox node or the KubeVirt CDI). Omni does not configure that.
Configure the CA
To make Omni deliver your CA to the machines:- Put your CA certificates into one PEM file. Use only your organization’s own CAs, not a full system CA bundle: every machine configuration carries the file.
-
Mount the file into the Omni container under
/etc/ssl/certs/, and point--trusted-roots-fileat it:Mounting a single file into/etc/ssl/certs/adds your CA to the public CAs Omni already trusts. Do not mount a directory over/etc/ssl/certs/and do not setSSL_CERT_DIR. Both replace the public CAs, and Omni can no longer reach public services. With the Helm chart, mount the file the same way withextraVolumesandextraVolumeMounts, and setconfig.trustedRootsFile. The chart’s README has an example. - Restart Omni.
How existing machines get the CA
Configure the CA before the first machine joins whenever you can. Machines that join after that carry the CA everywhere from their first boot. Machines that existed before you set the CA get it in their running configuration immediately. That configuration is kept across reboots, so an ordinary reboot is fine. Their boot image (the installed Talos image, or the boot media of a machine that is not installed) gets the CA only at their next install or upgrade. Omni does not upgrade machines to deliver the CA. A machine boots with the configuration of its boot image alone when:- it is removed from a cluster (the cluster is deleted or scaled down). Omni resets the machine, which wipes its configuration.
- it is not installed (runs from boot media) and reboots.
- Installed machines: upgrade them. Upgrading Talos to another version (a patch release is enough) or changing their extensions or kernel arguments installs a new image with the CA.
- Machines that are not installed: boot them from new installation media.
- Machines created by an infrastructure provider that passes user data: they keep the user data they were created with. That user data replaces the configuration of the boot image, so recreate them with a provider version that supports the CA.
Moving an existing Omni to a certificate from your CA
To switch an Omni that already has connected machines to a certificate from your CA:- Add the CA to the file and restart Omni. Keep serving the machine API with its current certificate.
- Get the CA into the boot images of the existing machines, as described above.
- Switch the machine API to the certificate signed by your CA.
Rotate the CA
Renewing the server certificates or an intermediate CA under the same root CA needs no change in Omni, as long as the file contains the root CA. To replace the root CA:- Put both the old and the new root CA into the file and restart Omni. The machines get both through a configuration update, without a reboot.
- Get the new root CA into the boot images of the machines, as described in How existing machines get the CA.
- Switch the machine API and the Image Factory to certificates signed by the new root CA.
- Remove the old root CA from the file and restart Omni.