Talos containerd custom runtime fails to initialize on production nodes
0 reputation · 16 May 2023, 12:03 UTC
0 reputation · 16 May 2023, 12:03 UTC
A Talos Linux machine config uses the containerd section to set runtime.untrusted_workload_runtime to kata-runtime. The same configuration boots successfully in a local environment but prevents containerd from starting on production nodes.
The goal is to diagnose whether the failure stems from the minimal production initramfs excluding Kata runtime binaries, stricter SELinux policy, or both. Talos version assumptions matter because the initramfs layout changed after v0.13, and rebuilding the image incorrectly can leave nodes unbootable.
It is unresolved whether Talos should automatically inject required runtime dependencies into the initramfs or expect users to provide them through extensions, and the documentation does not clearly define how extensions are ordered before containerd starts.
Which component is responsible for making a custom runtime available before containerd initializes? Should the machine config declare runtime dependencies explicitly, or is extending the initramfs the supported path for production deployments?
35275 reputation · 16 May 2023, 22:55 UTC
The containerd machine configuration block is responsible for referencing a runtime handler, not provisioning the runtime binaries. If runtime.untrusted_workload_runtime is set to kata-runtime, containerd expects that binary to already exist in the node's root filesystem. The failure on production nodes indicates that the production image/initramfs lacks the Kata runtime binaries, whereas your local environment likely used an image or schematic where these were pre-installed.
The discrepancy between local and production environments is almost certainly due to a difference in the Talos installer image or the schematic used. Local tests often use "fat" images or specific extensions for development, while production typically uses a minimal initramfs to reduce the attack surface. SELinux is a secondary possibility; however, a missing binary typically triggers an ENOENT or execution error before SELinux permission denials (AVC) occur.
To make a custom runtime available, you must extend the Talos image itself. The supported path for production deployments is to include the runtime as a Talos System Extension during the image build process.
containerd section of your machine config will correctly map the handler to the existing binary.Before rebuilding production images, verify the failure mode on a failing node:
# Check containerd service status
talosctl -n <node> services
# Inspect logs for "no such file or directory" (missing binary)
# vs "permission denied" (SELinux)
talosctl -n <node> logs containerd
Missing Diagnostic Detail: Please provide the specific error string from the containerd logs. If the logs show permission denied rather than no such file or directory, the recommendation shifts from image rebuilding to SELinux policy adjustment.
Use comments to ask for clarification. Post a solution as an answer.
35,275 reputation · 16 May 2023, 13:44 UTC
Talos’s containerd.runtime.untrusted_workload_runtime only tells containerd which binary to invoke; it does not bring the binary into the boot image. In v0.13+ the separate extensions.squashfs was merged into initramfs.xz, so any runtime must be baked into the initramfs via the machine.extensions field or a custom image build. If the extension is omitted, kata-runtime is missing when containerd starts, causing the init failure you see on production nodes.
Verification tip: on a failing node run talosctl ls /usr/bin/kata-runtime (or the path the extension installs). If it’s absent, rebuild the image with talosctl image factory --extensions siderolabs/kata-containers: and boot a disposable node to confirm containerd starts.