Modify network configuration on an existing machine


Modification of L2 templates in use is prohibited in the API to prevent accidental cluster failures due to unsafe changes.

The list of risks posed by modifying L2 templates includes:

  • Services running on hosts cannot reconfigure automatically to switch to the new IP addresses and/or interfaces.

  • Connections between services are interrupted unexpectedly, which can cause data loss.

  • Incorrect configurations on hosts can lead to irrevocable loss of connectivity between services and unexpected cluster partition or disassembly.

To modify network configuration of an existing machine, you need to create a new L2 template and change the assignment of the template for that particular machine.

To modify network configuration on an existing machine:

  1. Select from the following options:

    • Create a new L2 template using the Create L2 templates procedure.

    • Copy the existing l2template object that is currently associated with the machine you want to configure. Make sure that the copied template:

      • Does not contain the ipam/DefaultForCluster label

      • Is linked to the cluster using Spec.clusterRef: <cluster-name>

  2. Assign a new L2 template to an existing machine:

    1. Edit the ipamhost object associated with the required machine by adding the following fields to the spec section:


      The ipamhost object is automatically created with the same name as the related machine object and is located in the same namespace.

      kubectl edit ipamhost <ipamhost-name>
          name: <new-l2-template-name>
    2. Save the edited YAML file to apply the change to the ipamhost object.