Configure host names for cluster machines

TechPreview Available since 2.24.0

You can enable custom host names for cluster machines so that any machine host name in a particular region matches the related Machine object name. For example, instead of the default kaas-node-<UID>, a machine host name will be master-0. The custom naming format is more convenient and easier to operate with.

Note

After you enable custom host names on an existing management or regional cluster, names of all newly deployed machines in the region will match machine host names. Existing host names will remain the same.

To enable custom host names during management or regional cluster bootstrap, export the CUSTOM_HOSTNAMES=true variable during initial cluster configuration. For details, see Deployment Guide.

To enable custom host names on an existing management or regional cluster:

  1. Open the Cluster object of the management or regional cluster for editing:

    kubectl edit cluster <mgmtOrRegionalclusterName>
    
  2. In the spec.providerSpec.value.kaas.regional section of the required region, find the required provider name under helmReleases and add customHostnamesEnabled: true under values.config.

    For example, for the bare metal provider in region-one:

    regional:
     - helmReleases:
       - name: baremetal-provider
         values:
           config:
             allInOneAllowed: false
             customHostnamesEnabled: true
             internalLoadBalancers: false
    

    The configuration applies in several minutes after the <providerName>-provider-* Pods restart automatically.

  3. Verify that customHostnames is present in the provider ConfigMap:

    kubectl -n kaas get configmap provider-config-<providerName>-<regionName> -o=yaml | grep customHostnames