Talos Disk Encryption Migration
Talos Linux supports LUKS2 disk encryption for the EPHEMERAL and STATE partitions. However, encryption only takes effect on empty or unformatted partitions — existing partitions must be wiped before encryption can be applied. This makes encryption migration a disruptive operation that requires careful orchestration.
For upstream details, see the Talos disk encryption docs.
Prerequisites
Section titled “Prerequisites”- A running Talos cluster managed by KSail
- Encryption config patches prepared (machine config with
systemDiskEncryptionsettings) - Redundant workloads — migration is rolling but temporarily reduces cluster capacity
Detecting Encryption Changes
Section titled “Detecting Encryption Changes”Use --dry-run to preview whether an update requires partition wipes:
ksail cluster update --dry-runKSail compares the running node configs against the desired configs and reports any encryption changes that require a wipe-and-reboot cycle.
Automated Migration
Section titled “Automated Migration”KSail can orchestrate a rolling encryption migration automatically:
ksail cluster update --forceWorkers are processed before control-plane nodes. The procedure differs by partition:
EPHEMERAL Partition
Section titled “EPHEMERAL Partition”For each node:
- Cordon — prevent new workloads from being scheduled
- Drain — evict existing workloads
- Staged apply — write the new config without rebooting
- Wipe EPHEMERAL — destroy the unencrypted partition
- Reboot — node reformats EPHEMERAL with LUKS2
- Wait Ready — confirm the node rejoins the cluster
- Uncordon — allow workloads again
STATE Partition
Section titled “STATE Partition”For each node:
- Cordon — prevent new workloads from being scheduled
- Drain — evict existing workloads
- Wipe STATE — destroy the partition (node enters maintenance mode)
- Insecure apply — push the new config to the node in maintenance mode
- Wait Ready — confirm the node rejoins the cluster
- Uncordon — allow workloads again
Manual Migration
Section titled “Manual Migration”If automated migration is not suitable (for example, clusters not managed by KSail or when you need finer control), you can perform the steps manually with talosctl.
EPHEMERAL Partition
Section titled “EPHEMERAL Partition”# For each node (one at a time):kubectl cordon <node>kubectl drain <node> --ignore-daemonsets --delete-emptydir-datatalosctl apply-config -f config.yaml -n <node-ip> --mode=stagedtalosctl reset --system-labels-to-wipe EPHEMERAL -n <node-ip> --reboot=true# Wait for the node to rejoin and become Readykubectl uncordon <node>STATE Partition
Section titled “STATE Partition”# For each node (one at a time):kubectl cordon <node>kubectl drain <node> --ignore-daemonsets --delete-emptydir-datatalosctl reset --system-labels-to-wipe STATE -n <node-ip> --reboot=true# Node enters maintenance mode — apply config insecurelytalosctl apply-config --insecure -n <node-ip> -f config.yaml# Wait for the node to rejoin and become Readykubectl uncordon <node>Important Notes
Section titled “Important Notes”- One node at a time — always wait for the previous node to become Ready before proceeding
- Drain before wiping — prevents workload disruption
- Verify cluster health between nodes (
kubectl get nodes,talosctl health)
Removing Encryption
Section titled “Removing Encryption”Removing encryption follows the same process: the partition must be wiped so it can be reformatted without LUKS2. Use the same ksail cluster update --force workflow or the manual steps above with a config that removes the encryption settings.
Related Links
Section titled “Related Links”- Talos Disk Encryption — upstream Talos documentation
- Talos System Disk Encryption Config — configuration reference