Skip to main content
FieldTypeDescriptionValue(s)
namestringName of the container.

Must be between 1 and 63 characters long, and can only contain lowercase ASCII
letters, digits and hyphens. It is used as the containerd container ID and as the
container’s log identifier, so it may not collide with a Talos service name.
imagestringOCI image reference supplying the container’s root filesystem.

A digest-pinned reference (repo@sha256:...) is recommended: it is the only form
that guarantees the same bytes on every pull. Short references are accepted and
normalized, so nginx becomes index.docker.io/library/nginx:latest.
entrypoint[]stringOverrides the image’s ENTRYPOINT.

Unset means the image’s own entrypoint is used.
args[]stringOverrides the image’s CMD.
workingDirstringOverrides the image’s WORKDIR.
runAsContainerRunAsOverrides the image’s USER uid and/or gid.

There are no user namespaces, so a container running as uid 0 is root on the host.
environment[]stringEnvironment variables, in KEY=value form, merged over the image’s own ENV.

Values are stored in the machine configuration verbatim, so treat anything put here
as being as sensitive as the machine configuration itself.
mountsContainerMountFilesystems to mount into the container.
devicesContainerDeviceDevices to hand to the container.
securityContainerSecuritySecurity settings for the container.
networkContainerNetworkNetwork settings for the container.
resourcesContainerResourcesResource limits, applied as cgroup v2 settings.
lifecycleContainerLifecycleLifecycle settings for the container.

runAs

ContainerRunAs overrides the image’s user and group.
FieldTypeDescriptionValue(s)
uidint32UID to run the container’s entrypoint as.

Unset means use the image’s own USER. There are no user namespaces, so uid 0 is host
root.

Required when the image’s USER names its user rather than giving a numeric uid
(e.g. app or app:app): Talos does not read the image’s /etc/passwd, and rejects
such a container instead of running it as root.
gidint32GID to run the container’s entrypoint as.

Unset means use the image’s own USER.

Required when the image’s USER names its group (e.g. app:app), or names only a user
(e.g. app), whose primary group would come from the image’s /etc/passwd: Talos does
not read it, and rejects such a container instead of running it as root.

mounts[]

ContainerMount describes a single filesystem to mount into the container. Exactly one source must be set. Raw OCI mounts are deliberately not exposed; every source is typed so that Talos can reason about what a container is allowed to reach.
FieldTypeDescriptionValue(s)
volumeVolumeMountMount a user, existing or external volume by name.

The name is that of a UserVolumeConfig, ExistingVolumeConfig or
ExternalVolumeConfig document. Volume names are unique across those kinds, so the
name resolves to one volume. The volume must be declared in the same configuration.

The volume is mounted from /var/mnt/<name> on the host. Declaring this mount also
makes the container wait for the volume to be mounted before it starts.
tmpfsTmpfsMountMount a tmpfs for scratch space.
hostPathHostPathMountBind-mount a path from the host.

The source must already exist; Talos will not create it. This is the widest of the
three sources and the only one that can reach arbitrary host state.

volume

VolumeMount mounts a volume by name.
FieldTypeDescriptionValue(s)
namestringName of the volume to mount.

The name of a UserVolumeConfig, ExistingVolumeConfig or ExternalVolumeConfig document.
destinationstringAbsolute path inside the container’s mount namespace.
options[]stringMount options. Volume mounts are writable by default (rw).

A volume whose ExistingVolumeConfig or ExternalVolumeConfig declares it
read-only must be mounted with ro.
ro
rw
noexec
nosuid
nodev
noatime
rbind
rshared

tmpfs

TmpfsMount mounts a tmpfs.
FieldTypeDescriptionValue(s)
destinationstringAbsolute path inside the container’s mount namespace.
sizestringSize of the tmpfs, e.g. 64MiB. Empty means the kernel default.
options[]stringMount options. Tmpfs mounts are writable by default (rw).

hostPath

HostPathMount bind-mounts a host path.
FieldTypeDescriptionValue(s)
sourcestringAbsolute path on the host. Must already exist.
destinationstringAbsolute path inside the container’s mount namespace.
options[]stringMount options. Host path mounts are writable by default (rw).

devices[]

ContainerDevice describes a single device to hand to the container. Exactly one source must be set.
FieldTypeDescriptionValue(s)
rawVolumeRawVolumeDeviceHand a raw volume to the container as a block device.

The raw volume is referenced by the name of its RawVolumeConfig document.
The container gets a device node at the destination and is allowed to read and write
that device, and no other block device. This works with the restricted profile,
no capabilities are added. For an encrypted raw volume the node is the unlocked device.

Declaring this device makes the container wait for the raw volume to be ready, and the
raw volume is not closed while the container is running. A raw volume can be handed to
a single container only.

rawVolume

RawVolumeDevice hands a raw volume to the container by name.
FieldTypeDescriptionValue(s)
namestringName of the RawVolumeConfig document.
destinationstringPath of the device node inside the container.

Must be under /dev/, and not one of the entries the container runtime creates there
itself (e.g. /dev/null, /dev/pts). The node keeps the owner and mode of the device
on the host.

security

ContainerSecurity configures the container’s security posture.
FieldTypeDescriptionValue(s)
profileContainerSecurityProfileSecurity profile.

restricted drops all capabilities, allows no device access, and mounts the rootfs
and sysfs read-only. privileged grants all grantable capabilities and all devices,
and mounts sysfs read-write.
restricted
privileged
capabilitiesContainerCapabilitiesLinux capabilities to add or drop on top of the profile.

When the container runs as a non-root user (through runAs or the image’s USER), the
resulting capabilities (the profile’s, minus drop, plus add) are also raised into the
ambient set, so that they remain effective after the entrypoint is executed. Ambient
capabilities are inherited by every program the container runs, not only its entrypoint,
so grant only what the workload needs.
machinedAccessboolPublishes the container’s PID so machined’s API can recognize it, and bind-mounts the
machined API socket into the container.

This alone does not grant DAC access to the socket, which is owned by the apid user:
reaching it in practice still requires profile: privileged or an equivalent capability/
runAs grant. Once connected, the container may request any role, same as extension
services; the RPC’s own role requirements are what actually gate access.
seccompProfileContainerSeccompSeccomp profile applied to the container.

Unset means the containerd default seccomp profile, independently of the security
profile: even a privileged container is filtered by it.

capabilities

ContainerCapabilities adjusts the container’s Linux capabilities.
FieldTypeDescriptionValue(s)
add[]stringCapabilities to grant, without the CAP_ prefix.
drop[]stringCapabilities to remove, without the CAP_ prefix. ALL removes every capability.

seccompProfile

ContainerSeccomp selects the seccomp filter applied to the container. For compatibility, a bare profile type (e.g. seccompProfile: unconfined) is accepted as a shorthand for seccompProfile: {type: unconfined}.
FieldTypeDescriptionValue(s)
typeContainerSeccompProfileSeccomp profile type.

default applies the containerd default seccomp profile. unconfined applies no
seccomp filter at all, which some workloads need, e.g. a nested container runtime
creating session keyrings. localhost applies the profile named by localhostProfile.
default
unconfined
localhost
localhostProfilestringName of the seccomp profile to apply, declared by a SeccompProfileConfig document
(or the deprecated .machine.seccompProfiles field).

Required with, and only allowed with, type: localhost. Updating the referenced
profile restarts the container with the new profile.

network

ContainerNetwork configures the container’s network namespace.
FieldTypeDescriptionValue(s)
modeContainerNetworkModeNetwork mode.

none gives the container its own empty network namespace with no host access.
host shares the host network namespace, so the container sees every interface and
can bind any port.
none
host

resources

ContainerResources configures cgroup v2 resource limits.
FieldTypeDescriptionValue(s)
limitsContainerResourceLimitsHard ceilings the container cannot exceed.

limits

ContainerResourceLimits are hard ceilings.
FieldTypeDescriptionValue(s)
cpustringCPU ceiling in millicores, mapped onto cgroup v2 cpu.max.

1000m is one core.
memorystringMemory ceiling, mapped onto cgroup v2 memory.max.

Exceeding it OOM-kills the container.
swapstringSwap ceiling, mapped onto cgroup v2 memory.swap.max.

0 keeps the container’s memory out of swap entirely, so its memory ceiling is enforced
by the OOM killer rather than by swapping. Unset leaves the container free to use the
node’s swap.

lifecycle

ContainerLifecycle configures how Talos starts, runs and stops the container.
FieldTypeDescriptionValue(s)
dependsOnContainerDependsOnConditions which must be satisfied before the container is started.
healthCheckContainerHealthCheckProbe deciding whether the running container is healthy.

Without a health check, a running container is healthy. With one, it is reported as
pending until the first check passes, and as degraded once failureThreshold consecutive
checks fail. A failing check never restarts the container. Health gates other containers
which list this one in lifecycle.dependsOn.containers.

The probe connects to 127.0.0.1 inside the container’s network namespace.
stopTimeoutDurationTime the container gets to exit after SIGTERM before it is killed with SIGKILL.

It applies whenever Talos stops the container: on shutdown, reboot and upgrade, when it is
replaced after a change or restarted with talosctl restart, and when it is removed.
Defaults to 10s. Must be greater than 0 and at most 4m.
Changing it replaces the running container, which is still stopped with its previous timeout.
restartContainerRestartHow the container is restarted after it exits.

dependsOn

ContainerDependsOn gates container startup on external conditions.
FieldTypeDescriptionValue(s)
paths[]stringHost paths which must exist before the container starts.

Polled, so a path that never appears leaves the container waiting indefinitely.
network[]stringNetwork readiness conditions which must be satisfied.addresses
connectivity
hostname
etcfiles
timeboolWhether the clock must be synchronized before the container starts.
containersContainerDependencyOther containers, by document name, which must be running first, or have succeeded.

An entry is either the name of a container which must be running and healthy, or a name with
a condition.

On shutdown, reboot and upgrade, the container is stopped before them, as long as that fits
into the time the shutdown gives the containers. The order applies to the containers on the
same node only.

Cycles are rejected when the machine configuration is applied.

containers[]

ContainerDependency is a container which must be running, or have succeeded, first.
FieldTypeDescriptionValue(s)
namestringName of the ContainerConfig document.
conditionContainerDependencyConditionrunning (the default) waits for the container to be running and healthy, succeeded for
it to have exited with code 0 and not to be restarted, e.g. a container preparing what this one
needs. It is checked again on every boot, as the containers run again.
running
succeeded

healthCheck

ContainerHealthCheck configures a probe which decides whether a running container is healthy. Exactly one of tcp, http or grpc must be set.
FieldTypeDescriptionValue(s)
tcpContainerTCPHealthCheckProbe by opening a TCP connection to the port.

The check passes if the connection is established.
httpContainerHTTPHealthCheckProbe by sending an HTTP GET request to the port.

The check passes if the response status is in the 200-399 range.
grpcContainerGRPCHealthCheckProbe by calling the gRPC health checking protocol (grpc.health.v1.Health/Check) on the port.

The check passes if the reported status is SERVING.
initialDelayDurationDelay after the container starts before the first check runs.

Defaults to 0s.
intervalDurationInterval between checks.

Defaults to 10s.
timeoutDurationTime after which a single check is considered failed.

Defaults to 1s, and may not exceed the interval.
failureThresholduint32Number of consecutive failed checks after which the container is reported degraded.

Defaults to 3.

tcp

ContainerTCPHealthCheck probes a TCP port.
FieldTypeDescriptionValue(s)
portuint16Port to connect to on the container’s loopback address.

http

ContainerHTTPHealthCheck probes an HTTP endpoint.
FieldTypeDescriptionValue(s)
portuint16Port to connect to on the container’s loopback address.
pathstringRequest path.

Defaults to /.

grpc

ContainerGRPCHealthCheck probes a gRPC health service.
FieldTypeDescriptionValue(s)
portuint16Port to connect to on the container’s loopback address.
servicestringService name to pass in the health check request.

Empty asks for the overall health of the server.

restart

ContainerRestart configures how the container is restarted after it exits.
FieldTypeDescriptionValue(s)
policyContainerRestartPolicyWhen the container is restarted after it exits.

always restarts it after every exit, on-failure after it failed (a non-zero exit code
or a failure to start), and never runs it once.
A container which is not restarted keeps its outcome until its configuration changes or it
is removed, and runs again after a reboot or a restart of machined.
talosctl restart only signals the container, so it doesn’t run such a container again.
always
on-failure
never
maxRetriesintHow many times a failed container is restarted at most, with the on-failure policy.

Unset restarts it until it succeeds.
delayDurationTime to wait after the container exited before it is restarted.
Defaults to 5s.
maxDelayDurationLongest time to wait before a restart.

The delay doubles with each restart of a container which ran for a shorter time than this,
up to this. Defaults to the delay, so the delay doesn’t grow.