Modify network configuration on an existing machine¶
Avoid modifying existing L2 templates and subnets that the deployed machines use. This prevents multiple clusters failures caused by 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.
Starting from MOSK 22.3, modification of L2 templates in use is prohibited in the API to prevent accidental cluster failures due to unsafe changes.
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:
Select from the following options:
Create a new L2 template using the Create L2 templates procedure.
Copy the existing
l2templateobject that is currently associated with the machine you want to configure. Make sure that the copied template:
Does not contain the
Is linked to the cluster using
Assign a new L2 template to an existing machine:
ipamhostobject associated with the required machine by adding the following fields to the
ipamhostobject is automatically created with the same name as the related
machineobject and is located in the same namespace.
kubectl edit ipamhost <ipamhost-name>
spec: l2TemplateSelector: name: <new-l2-template-name>
Save the edited YAML file to apply the change to the