omnictl
CLI tool or using Image Factory directly.
Both methods allow you to label your machines programmatically.
omnictl
omnictl
, you can set initial machine labels using the --initial-labels
flag. This allows you to assign key-value pairs as labels to the machines that boot from that media or the PXE boot URL.
Here’s the basic syntax for adding initial labels:
amd64
ISO image and set two labels: environment=production
and region=us-west
. Here’s how you would do that:
d2f4229b6157ba7e1dba8c3b4de42263e4baa35111e960b6a18841332d0f2035
.
Here, you can see that the custom image contains the extra Kernel arguments for Talos to connect to your Omni instance on boot using Siderolink. It also contains the machine labels you have specified in a nested yaml in the meta section with key 12
. Here, the key 12
is a Talos META key reserved for Omni for the initial machine labels.
omnictl download rpi_generic --initial-labels environment=production,region=us-west --pxe
.This command will print the PXE boot URL and exit.omnictl get connectionparams -oyaml
, which will print them under .spec.args
field.omnictl
.omnictl
CLI tool.
To check labels using omnictl
, you can use either of these commands (replace <machine-id>
with the actual machine ID):