Modify network configuration on an existing machine¶
Note
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:
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
labelIs linked to the cluster using
Spec.clusterRef: <cluster-name>
Assign a new L2 template to an existing machine:
Edit the
ipamhost
object associated with the required machine by adding the following fields to thespec
section:Note
The
ipamhost
object is automatically created with the same name as the relatedmachine
object 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
ipamhost
object.