Customize hostname​
Elemental hostname management overview​
When a host boots from the Elemental ISO, the hostname is temporarily set (transient hostname) to the one provided from the DHCP server.
If the DHCP server doesn't provide a hostname, the Elemental ISO provides a transient hostname
in the form: rancher-${RANDOM}
.
As soon as the boot process is finished, the registration phase kicks in: the host connects to
the Elemental Operator, which creates a MachineInventory
for the host.
Each host registered with the Elemental Operator is tracked by a MachineInventory
resource.
The name
of the MachineInventory
resource associated with the node is the permanent (static) hostname
eventually set to the host.
This permanent hostname is set on the node during the K8s cluster provisioning phase only.
Before the K8s provisioning phase, the node hostname is either the DHCP assigned one or rancher-${RANDOM}
.
For the remainder of this section we will refer to the hostname
meaning the permanent hostname,
i.e., the hostname that is set after the host has been provisioned as part of a K8s cluster.