website/content/v1.13/reference/configuration/network/hostnameconfig.md
{{< highlight yaml >}} apiVersion: v1alpha1 kind: HostnameConfig hostname: worker-33 # A static hostname to set for the machine. {{< /highlight >}}
{{< highlight yaml >}} apiVersion: v1alpha1 kind: HostnameConfig auto: stable # A method to automatically generate a hostname for the machine.
{{< /highlight >}}
| Field | Type | Description | Value(s) |
|---|---|---|---|
auto | AutoHostnameKind | A method to automatically generate a hostname for the machine. |
There are two methods available:
stable - generates a stable hostname based on machine identityoff - disables automatic hostname generation, Talos will wait for an external source to provide a hostname (DHCP, cloud-init, etc).Automatic hostnames have the lowest priority over any other hostname sources: DHCP, cloud-init, etc.
Conflicts with hostname field. |stable
off
|
|hostname |string |A static hostname to set for the machine.
This hostname has the highest priority over any other hostname sources: DHCP, cloud-init, etc.
Conflicts with auto field. <details><summary>Show example(s)</summary>{{< highlight yaml >}}
hostname: controlplane1
{{< /highlight >}}{{< highlight yaml >}}
hostname: controlplane1.example.org
{{< /highlight >}}</details> | |