talosconfig — Machine Configuration
For CLI operations see talosctl. For Terraform provider see talos-terraform.
Format
Multi-document YAML — each document is a config type. All config is declarative, applied via talosctl apply-config or talosctl patch. Legacy single-document v1alpha1 format still supported.
Cluster Config Documents
| Document type |
Kind |
Purpose |
| Machine config |
Config |
Core: machine type, install, network, disks |
| Environment config |
EnvironmentConfig |
Container env overrides (v1.13+, replaces .machine.env) |
| Install config |
InstallConfig |
Separate disk/install settings |
| Disk encryption config |
DiskEncryptionConfig |
LUKS2 encryption settings per partition |
| Network config |
NetworkConfig |
Interface config, DNS, NTP |
| KubeSpan config |
KubeSpanConfig |
WireGuard mesh settings |
| Image verification config |
ImageVerificationConfig |
Container signature verification (v1.13+) |
| External volume config |
ExternalVolumeConfig |
Virtiofs volumes (v1.13+) |
| Probe config |
ProbeConfig |
Node/API health probes (v1.13+) |
| Resolver config |
ResolverConfig |
DNS resolver config (v1.13+) |
| Routing rule config |
RoutingRuleConfig |
Advanced routing rules (v1.13+) |
| VRF config |
VRFConfig |
VRF interface config (v1.13+) |
Key Config Fields
# Cluster document example
kind: Config
version: v1alpha1
machine:
type: controlplane # controlplane, worker
install:
disk: /dev/sda # Install target
image: ghcr.io/siderolabs/installer:v1.13.0
wipe: false # Preserve on re-apply
network:
hostname: node-1
interfaces:
- interface: eno1
dhcp: false
addresses: [10.0.1.10/24]
routes:
- network: 0.0.0.0/0
gateway: 10.0.1.1
nameservers: [1.1.1.1]
systemDiskEncryption:
state: # Encrypts etcd partition
provider: luks2
keys:
- slot: 0
tpm: {} # TPM 2.0 sealed key
ephemeral: # Encrypts ephemeral partition
provider: luks2
keys:
- slot: 0
tpm: {}
cluster:
network:
cni:
name: none # Install CNI separately
podSubnets: [10.244.0.0/16]
serviceSubnets: [10.96.0.0/12]
apiServer:
extraArgs:
feature-gates: [ServerSideApply=true] # Slice format in v1.13+
etcd:
extraArgs:
quota-backend-bytes: "8589934592" # 8GB
auto-compaction-retention: "1000"
Config Generation
| Flag |
Purpose |
--with-secrets secrets.yaml |
Use saved secrets (required for reproducibility) |
--config-patch @patch.yaml |
Patch all node types |
--config-patch-control-plane @cp.yaml |
Patch control planes only |
--config-patch-worker @w.yaml |
Patch workers only |
--additional-sans <dns> |
Extra SANs for API cert |
--dns-domain <domain> |
Cluster DNS domain (default: cluster.local) |
--kubernetes-version v1.36.0 |
Override K8s version |
Always use --with-secrets — without it, each run produces different certs/keys and nodes can't join across runs. Store the secrets file encrypted (Vault/SOPS).
Applying Config
⚠️ Every change MUST be dry-run first, and the user MUST confirm before applying.
⚠️ apply-config replaces the ENTIRE machine config. It needs the full config file, not a partial patch. Targeted changes use talosctl patch machineconfig.
# Targeted patch (dry-run first!)
talosctl patch machineconfig --nodes cp1 --patch @patch.yaml --dry-run
# after user confirms:
talosctl patch machineconfig --nodes cp1 --patch @patch.yaml
# Full config replacement (dry-run first!)
talosctl apply-config --nodes cp1 --file controlplane.yaml --dry-run
# after user confirms:
talosctl apply-config --nodes cp1 --file controlplane.yaml
Apply Modes
| Mode |
Behavior |
auto (default) |
Immediate apply, reboot if needed |
no-reboot |
Apply without reboot |
reboot |
Always reboot to apply |
staged |
Apply on next reboot |
try |
Apply, rollback after timeout if not confirmed |
v1.13+ Config Features
- LifecycleService — Unified upgrade API. Replaces legacy upgrade lifecycle.
- EnvironmentConfig document — Replaces
.machine.env in machine config. Separate config document.
- ImageVerificationConfig — Verify container image signatures before pulling.
- ExternalVolumeConfig — Virtiofs volumes for VMs.
- Slice args —
extraArgs now accept YAML slices ([val1, val2]) in addition to string maps.
- KubeSpanConfig document — WireGuard mesh config as separate document.
- Advanced network docs — RoutingRuleConfig, VRFConfig, ProbeConfig, ResolverConfig as separate documents.
Common Mistakes
- Losing secrets — Always
--with-secrets secrets.yaml during gen config. Without secrets, you cannot add nodes, rotate certs, or recover.
- Forgot
--with-secrets during gen — Without it, each run produces different certs/keys. Nodes from one gen can't join configs from another.
--stage/--preserve deprecated — Legacy upgrade flags, removed in Talos 1.18. Use --no-reboot instead of --stage.
- Apply config to all nodes at once — For CP changes, use sequential apply with health checks between nodes (etcd quorum).
- Hardcoded network assumptions — Config encodes node-specific IPs/hostnames. Use
--config-patch-* per node type rather than editing the base config per node.
.machine.env in v1.13+ — Replaced by EnvironmentConfig document. Old field is deprecated.
1---2name: talosconfig3description: Talos Linux machine configuration — multi-document YAML format, config documents, generation flags, patching, apply modes, and v1.13+ config features.4---56# talosconfig — Machine Configuration78For CLI operations see `talosctl`. For Terraform provider see `talos-terraform`.910## Format1112Multi-document YAML — each document is a config type. All config is declarative, applied via `talosctl apply-config` or `talosctl patch`. Legacy single-document v1alpha1 format still supported.1314## Cluster Config Documents1516| Document type | Kind | Purpose |17|---------------|------|---------|18| Machine config | `Config` | Core: machine type, install, network, disks |19| Environment config | `EnvironmentConfig` | Container env overrides (v1.13+, replaces `.machine.env`) |20| Install config | `InstallConfig` | Separate disk/install settings |21| Disk encryption config | `DiskEncryptionConfig` | LUKS2 encryption settings per partition |22| Network config | `NetworkConfig` | Interface config, DNS, NTP |23| KubeSpan config | `KubeSpanConfig` | WireGuard mesh settings |24| Image verification config | `ImageVerificationConfig` | Container signature verification (v1.13+) |25| External volume config | `ExternalVolumeConfig` | Virtiofs volumes (v1.13+) |26| Probe config | `ProbeConfig` | Node/API health probes (v1.13+) |27| Resolver config | `ResolverConfig` | DNS resolver config (v1.13+) |28| Routing rule config | `RoutingRuleConfig` | Advanced routing rules (v1.13+) |29| VRF config | `VRFConfig` | VRF interface config (v1.13+) |3031## Key Config Fields3233```yaml34# Cluster document example35kind: Config36version: v1alpha137machine:38 type: controlplane # controlplane, worker39 install:40 disk: /dev/sda # Install target41 image: ghcr.io/siderolabs/installer:v1.13.042 wipe: false # Preserve on re-apply43 network:44 hostname: node-145 interfaces:46 - interface: eno147 dhcp: false48 addresses: [10.0.1.10/24]49 routes:50 - network: 0.0.0.0/051 gateway: 10.0.1.152 nameservers: [1.1.1.1]53 systemDiskEncryption:54 state: # Encrypts etcd partition55 provider: luks256 keys:57 - slot: 058 tpm: {} # TPM 2.0 sealed key59 ephemeral: # Encrypts ephemeral partition60 provider: luks261 keys:62 - slot: 063 tpm: {}64cluster:65 network:66 cni:67 name: none # Install CNI separately68 podSubnets: [10.244.0.0/16]69 serviceSubnets: [10.96.0.0/12]70 apiServer:71 extraArgs:72 feature-gates: [ServerSideApply=true] # Slice format in v1.13+73 etcd:74 extraArgs:75 quota-backend-bytes: "8589934592" # 8GB76 auto-compaction-retention: "1000"77```7879## Config Generation8081| Flag | Purpose |82|------|---------|83| `--with-secrets secrets.yaml` | Use saved secrets (required for reproducibility) |84| `--config-patch @patch.yaml` | Patch all node types |85| `--config-patch-control-plane @cp.yaml` | Patch control planes only |86| `--config-patch-worker @w.yaml` | Patch workers only |87| `--additional-sans <dns>` | Extra SANs for API cert |88| `--dns-domain <domain>` | Cluster DNS domain (default: cluster.local) |89| `--kubernetes-version v1.36.0` | Override K8s version |9091**Always use `--with-secrets`** — without it, each run produces different certs/keys and nodes can't join across runs. Store the secrets file encrypted (Vault/SOPS).9293## Applying Config9495**⚠️ Every change MUST be dry-run first, and the user MUST confirm before applying.**9697**⚠️ `apply-config` replaces the ENTIRE machine config.** It needs the full config file, not a partial patch. Targeted changes use `talosctl patch machineconfig`.9899```bash100# Targeted patch (dry-run first!)101talosctl patch machineconfig --nodes cp1 --patch @patch.yaml --dry-run102# after user confirms:103talosctl patch machineconfig --nodes cp1 --patch @patch.yaml104105# Full config replacement (dry-run first!)106talosctl apply-config --nodes cp1 --file controlplane.yaml --dry-run107# after user confirms:108talosctl apply-config --nodes cp1 --file controlplane.yaml109```110111### Apply Modes112113| Mode | Behavior |114|------|----------|115| `auto` (default) | Immediate apply, reboot if needed |116| `no-reboot` | Apply without reboot |117| `reboot` | Always reboot to apply |118| `staged` | Apply on next reboot |119| `try` | Apply, rollback after timeout if not confirmed |120121## v1.13+ Config Features122123- **LifecycleService** — Unified upgrade API. Replaces legacy upgrade lifecycle.124- **EnvironmentConfig document** — Replaces `.machine.env` in machine config. Separate config document.125- **ImageVerificationConfig** — Verify container image signatures before pulling.126- **ExternalVolumeConfig** — Virtiofs volumes for VMs.127- **Slice args** — `extraArgs` now accept YAML slices (`[val1, val2]`) in addition to string maps.128- **KubeSpanConfig document** — WireGuard mesh config as separate document.129- **Advanced network docs** — RoutingRuleConfig, VRFConfig, ProbeConfig, ResolverConfig as separate documents.130131## Common Mistakes132133- **Losing secrets** — Always `--with-secrets secrets.yaml` during `gen config`. Without secrets, you cannot add nodes, rotate certs, or recover.134- **Forgot `--with-secrets` during gen** — Without it, each run produces different certs/keys. Nodes from one gen can't join configs from another.135- **`--stage`/`--preserve` deprecated** — Legacy upgrade flags, removed in Talos 1.18. Use `--no-reboot` instead of `--stage`.136- **Apply config to all nodes at once** — For CP changes, use sequential apply with health checks between nodes (etcd quorum).137- **Hardcoded network assumptions** — Config encodes node-specific IPs/hostnames. Use `--config-patch-*` per node type rather than editing the base config per node.138- **`.machine.env` in v1.13+** — Replaced by `EnvironmentConfig` document. Old field is deprecated.