How to use META
-based network configuration on Talos metal
platform.
Note: This is an advanced feature which requires deep understanding of Talos and Linux network configuration.Talos Linux when running on a cloud platform (e.g. AWS or Azure), uses the platform-provided metadata server to provide initial network configuration to the node. When running on bare-metal, there is no metadata server, so there are several options to provide initial network configuration (before machine configuration is acquired):
META
-based network configuration.
Note:Talos dashboard provides a way to configureMETA
-based network configuration is only available on Talos Linuxmetal
platform.
META
-based network configuration for a machine using the console, but
it doesn’t support all kinds of network configuration.
META
-based network configuration is a YAML file with the following format:
*Spec
resource .spec
part, e.g the addresses:
section matches the .spec
of AddressSpec
resource:
scope:
should be set to global
and flags:
to permanent
.
Additionally, family:
should be set to either inet4
or inet6
depending on the address family.
The linkName:
property should match the name of the link the address is assigned to, it might be a physical link,
e.g. en9sp0
, or the name of a logical link, e.g. bond0
, created in the links:
section.
Example, IPv4 address:
links:
section is not important.
logical: true
- this is a logical link, not a physical onekind: bond
- this is a bonded linktype: ether
- this is an Ethernet linkbondMaster:
- defines bond configuration, please see Linux documentation on the available optionsmasterName: bond0
- the name of the bond this link is enslaved toslaveIndex: 0
- the index of the enslaved link, starting from 0, controls the order of bond slaveslogical: true
- this is a logical link, not a physical onekind: vlan
- this is a VLAN linktype: ether
- this is an Ethernet linkparentName: bond0
- the name of the parent linkvlan:
- defines VLAN configuration: vlanID
and vlanProtocol
table: main
, scope: global
, type: unicast
and protocol: static
are used.
The route most important fields are:
dst:
defines the destination network, if left empty means “default gateway”gateway:
defines the gateway addresspriority:
defines the route priority (metric), lower values are preferred for the same dst:
networkoutLinkName:
defines the name of the link the route is associated withsrc:
sets the source address for the route (optional)family:
should be set to either inet4
or inet6
depending on the address family.
Example, IPv6 default gateway:
10/8
via 10.68.182.0
gateway:
domainname:
is optional.
If the hostname is not set, Talos will use default generated hostname.
resolvers:
section is used to configure DNS resolvers, only single entry should be used:
dnsServers:
is not set, Talos will use default DNS servers.
timeServers:
section is used to configure NTP time servers, only single entry should be used:
timeServers:
is not set, Talos will use default NTP servers.
META
Network ConfigurationMETA
partition under the key 0xa
(decimal 10).
In this guide we will assume that the prepared network configuration is stored in the file network.yaml
.
Note: as JSON is a subset of YAML, the network configuration can be also supplied as a JSON document.
talosctl
to write a network configuration to a running Talos machine:
--meta
flag:
META
partition created yet before Talos Linux is installed, META
values can be set as an environment variable INSTALLER_META_BASE64
passed to the initial boot of Talos.
The supplied value will be used immediately, and also it will be written to the META
partition once Talos is installed.
When using imager
to create the ISO, the INSTALLER_META_BASE64
environment variable will be automatically generated from the --meta
flag:
When PXE booting, the value of INSTALLER_META_BASE64
should be set manually:
INSTALLER_META_BASE64
to the initial boot of Talos: talos.environment=INSTALLER_META_BASE64=<base64-encoded value>
.
META
Network ConfigurationMETA
keys as resources: