talosctl CLI utility.
The upgrade API call passes a node the installer image to use to perform the upgrade.
Each Talos version has a corresponding installer image, listed on the release page for the version, for example .
Upgrades use an A-B image scheme in order to facilitate rollbacks.
This scheme retains the previous Talos kernel and OS image following each upgrade.
If an upgrade fails to boot, Talos will roll back to the previous version.
Likewise, Talos may be manually rolled back via API (or talosctl rollback), which will update the boot reference and reboot.
Note An upgrade of the Talos Linux OS will not (since v1.0) apply an upgrade to the Kubernetes version by default.
Kubernetes upgrades should be managed separately per upgrading kubernetes.
Supported upgrade paths
Because Talos Linux is image based, an upgrade is almost the same as installing Talos, with the difference that the system has already been initialized with a configuration. The supported configuration may change between versions. The upgrade process should handle such changes transparently, but this migration is only tested between adjacent minor releases. Thus the recommended upgrade path is to always upgrade to the latest patch release of all intermediate minor releases. For example, if upgrading from Talos 1.0 to Talos 1.2.4, the recommended upgrade path would be:- upgrade from 1.0 to latest patch of 1.0 - to v1.0.6
- upgrade from v1.0.6 to latest patch of 1.1 - to v1.1.2
- upgrade from v1.1.2 to v1.2.4
Before upgrade to
Talos v1.13 onwards now supports NVIDIA GPU via the gpu-operator.NVIDIA GPU users
Talos 1.13 now supports configuring NVIDIA GPU via the gpu-operator. If using NVIDIA GPU on DGX systems, follow the NVIDIA proprietary driver guide. DGX systems are only known to work with the proprietary driver as of now. Before upgrading to Talos 1.13, uninstall the nvidia-device-plugin helm chart and delete the nvidia runtimeclass. Uninstall the nvidia-device-plugin helm chart: First list all helm installs:Video walkthrough
To see a live demo of an upgrade of Talos Linux, see the video below:After upgrade to
There are no specific actions to be taken after an upgrade.talosctl upgrade
To upgrade a Talos node, specify the node’s IP address and the
installer container image for the version of Talos to upgrade to.
For instance, if your Talos node has the IP address 10.20.30.40 and you want
to install the current version, you would enter a command such
as:
Note that because Talos Linux reboots via the kexec syscall, the extra reboot adds very little time.
Upgrade API changes in Talos v1.13
Talos v1.13 introduces a new streaming upgrade API viaLifecycleService.Upgrade.
The talosctl upgrade command now uses this new API by default, providing real-time progress reporting and support for parallel upgrades across multiple nodes.
New flags:
--progress <mode>- Controls the output mode for upgrade progress. Values:auto(default),plain.autouses a dynamic progress reporter if the output is a terminal, and falls back to plain text otherwise.plainalways uses plain text output.--namespace <name>- Containerd namespace to use for the upgrade image. Values:system(default),cri,inmem.
--reboot-mode flag now supports three values: default, powercycle, and force.
Deprecation notice The legacy upgrade flags (--force,--insecure,--preserve,--stage) are deprecated and will be removed in Talos 1.18. These flags are only used when falling back to the legacyMachineService.UpgradeAPI for older Talos versions.
Machine configuration changes
Talos 1.14 continues splitting the monolithicv1alpha1 document into small, focused configuration documents.
Every v1alpha1 field listed below is deprecated, but still supported, so a machine configuration which only uses v1alpha1 keeps working after the upgrade.
Unless noted otherwise, a deprecated field and its replacement document are mutually exclusive: a configuration which sets both is rejected.
Kubernetes
Kubernetes configuration is now expressed as a set of dedicated documents; new Kubernetes features and settings will only be available in the new documents.kube-proxy is now configured with a configuration file (via KubeProxyConfig) instead of command line arguments.
Other Kubernetes configuration changes:
- DiscoveryServiceConfig is a multi-document kind, so multiple discovery service endpoints can be configured now.
- The cluster ID encoding in the generated secrets bundle changed from
base64.URLEncodingtobase64.StdEncodingto align with the rest of Talos. - The default control plane
NoScheduletaint and the control plane node label are now listed explicitly in KubeNodeConfig. - KubeNetworkConfig adds
nodeCIDRMaskSizeIPv4(default24) andnodeCIDRMaskSizeIPv6(default64) to control the per-node pod CIDR mask size; pod and service subnet sizes are validated against them. .machine.kubelet.extraMountshas no equivalent in the new documents, and.machine.kubelet.disableManifestsDirectoryis locked totruethere.
Kernel and udev
If both the deprecatedv1alpha1 field and the new document are used, the new document takes precedence for conflicting settings.
Install, files and container runtime
.machine.installis deprecated in favor of the new UnattendedInstallConfig document, which carries the installerimageand aprovisioningsection with a CELvolumeSelectorto match the install disk.talosctl gen configandtalosctl cluster creategenerate this document by default now;.machine.installis still used for older version contracts..machine.filesis deprecated in favor of dedicated documents: EtcFileConfig for user-owned files under/etc(the documentnameis the path relative to/etc), and CRICustomizationConfig for CRI configuration. Talos-managed paths (resolv.conf,hosts,machine-id, CRI and Kubernetes configuration, trust bundles and identity files) are rejected byEtcFileConfig.- New CRICustomizationConfig document carries a TOML fragment merged into the CRI containerd configuration; fragments are merged in lexicographical order by document name.
The legacy
/etc/cri/conf.d/20-customization.partmachine file is still supported and is exposed under the reserved namecustomization. CRI configuration changes no longer require a reboot. .machine.baseRuntimeSpecOverridesis deprecated in favor of the new CRIBaseRuntimeSpecConfig document..machine.features.imageCacheis deprecated in favor of the new ImageCacheConfig document, wherelocalEnabledbecomeslocal.enabled. The deprecated field is still honored, so upgraded clusters keep their image cache enabled, but the field and the document cannot both be set.- New SecurityProfileConfig document with the
workloadIsolationoption (enabled by default for new clusters generated with Talos 1.14, absent — and therefore disabled — on upgraded clusters). - OOMConfig has a new
strictCgroupClassOrderingoption (defaults totrue) to enforce QoS class ordering when picking an OOM victim.
Network
.machine.features.hostDNSis deprecated: host DNS is now configured with thehostDNSsection of the ResolverConfig document.- ResolverConfig nameservers accept a
protocol(DNS over TLS and DNS over HTTPS are supported now) and atlsServerNamesetting, configured per nameserver. - TimeSyncConfig has a new
useNTSfield to enable Network Time Security for custom time servers (NTS is enabled by default for the defaulttime.cloudflare.comserver). - DHCPv4Config has a new
ignoreRoutesoption to ignore the default gateway and classless static routes offered by the DHCP server (the connected route for the leased address is still configured). DHCPv4 search domains are now applied to the resolver configuration. - New VethConfig document to configure virtual Ethernet pairs: both endpoints are created in the host network namespace and support the common link settings, addresses, routes and multicast configuration.
- New HTTPProbeConfig document to configure HTTP-based connectivity checks (probes).
- New BGPInstanceConfig document to run native BGP speakers on the host (local ASN, router-id, optional Linux VRF, advertised interfaces and neighbors), removing the need for the FRR system extension in fabric-facing setups.
Routes learned by one instance can be selectively imported into another with
importRoutes, andinstallRoutes: falsekeeps learned routes out of the Linux routing table.
Volumes and storage
- New FilesystemTrimConfig document to enable periodic filesystem trim (the
fstrimequivalent) with a globalinterval. The default machine configuration generated by Talos 1.14 includes it with a one week interval; upgraded clusters don’t have the document, so trimming stays disabled until it is added. The interval can be overridden or disabled per volume with the newtrimsection of VolumeConfig, UserVolumeConfig, ExistingVolumeConfig and ExternalVolumeConfig. - New FilesystemScrubConfig document to enable periodic online filesystem scrub (currently XFS only, via
xfs_scrub) with a globalinterval. Scrubbing is disabled by default, and the generated machine configuration does not include this document, so it stays disabled until it is added. The interval can be overridden or disabled per volume with the newscrubsection of VolumeConfig, UserVolumeConfig and ExistingVolumeConfig. - Volume encryption has a new
allowDiscardsoption (disabled by default) to pass TRIM/discard requests through to the underlying device. - VolumeConfig and UserVolumeConfig support a new
filesystem.xfs.minAllocationGroupSizesetting (defaults to 64 GiB, set to zero to restore stockmkfs.xfsbehavior); it only applies to volumes formatted by Talos 1.14 or later. - The
ETCD,CRI,KUBELETandLOGsystem volumes can be placed on dedicated partitions with a VolumeConfig document withprovisioningset (optionally encrypted); by default they remain directories under theEPHEMERALvolume. - The machine configuration generated by Talos 1.14 mounts the
EPHEMERALvolume (/var) withnoexecin addition tonosuidandnodev; existing machines are not affected by an upgrade. Setmount.securetofalsein the VolumeConfig document forEPHEMERALto opt out (this also disablesnosuidandnodev). btrfscan be used as a filesystem type for user and existing volumes (requires thebtrfssystem extension).- New LVMVolumeGroupConfig and LVMLogicalVolumeConfig documents to declaratively create and grow LVM volume groups and logical volumes.
- New RAIDArrayConfig document to declaratively create and grow Linux MD (software RAID) arrays;
raid1arrays withmetadata: "1.0"can be used as the install disk.
Upgrade sequence
When a Talos node receives the upgrade command, it cordons itself in Kubernetes, to avoid receiving any new workload. It then starts to drain its existing workload. NOTE: If any of your workloads are sensitive to being shut down ungracefully, be sure to use thelifecycle.preStop Pod spec.
Once all of the workload Pods are drained, Talos will start shutting down its
internal processes.
Once all the processes are stopped and the services are shut down, the filesystems will be unmounted.
This allows Talos to produce a very clean upgrade, as close as possible to a pristine system.
We verify the disk and then perform the actual image upgrade.
We set the bootloader to boot once with the new kernel and OS image, then we reboot.
After the node comes back up and Talos verifies itself, it will make
the bootloader change permanent, rejoin the cluster, and finally uncordon itself to receive new workloads.
FAQs
Q. What happens if an upgrade fails? A. Talos Linux attempts to safely handle upgrade failures. The most common failure is an invalid installer image reference. In this case, Talos will fail to download the upgraded image and will abort the upgrade. Sometimes, Talos is unable to successfully kill off all of the disk access points, in which case it cannot safely unmount all filesystems to effect the upgrade. In this case, it will abort the upgrade and reboot. It is possible (especially with test builds) that the upgraded Talos system will fail to start. In this case, the node will be rebooted, and the bootloader will automatically use the previous Talos kernel and image, thus effectively rolling back the upgrade. Lastly, it is possible that Talos itself will upgrade successfully, start up, and rejoin the cluster but your workload will fail to run on it, for whatever reason. This is when you would use thetalosctl rollback command to revert back to the previous Talos version.
Q. Can upgrades be scheduled?
A. Because the upgrade sequence is API-driven, you can easily tie it in to your own business logic to schedule and coordinate your upgrades.
Q. Can the upgrade process be observed?
A. Yes, using the talosctl dmesg -f command.
You can also use talosctl upgrade --wait, and optionally talosctl upgrade --wait --debug to observe kernel logs
Q. Are worker node upgrades handled differently from control plane node upgrades?
A. Short answer: no.
Long answer: Both node types follow the same set procedure.
From the user’s standpoint, however, the processes are identical.
However, since control plane nodes run additional services, such as etcd, there are some extra steps and checks performed on them.
For instance, Talos will refuse to upgrade a control plane node if that upgrade would cause a loss of quorum for etcd.
If multiple control plane nodes are asked to upgrade at the same time, Talos will protect the Kubernetes cluster by ensuring only one control plane node actively upgrades at any time, via checking etcd quorum.
Q. Can I break my cluster by upgrading everything at once?
A. Possibly - it’s not recommended.
Nothing prevents the user from sending near-simultaneous upgrades to each node of the cluster - and while Talos Linux and Kubernetes can generally deal with this situation, other components of the cluster may not be able to recover from more than one node rebooting at a time.
(e.g. any software that maintains a quorum or state across nodes, such as Rook/Ceph)
Q. Which version of talosctl should I use to update a cluster?
A. We recommend using the version that matches the current running version of the cluster.