Modify network configuration on an existing machine before 2.19.0¶
Starting from Container Cloud 2.17.0, 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.
Starting from Container Cloud 2.19.0, modification of L2 templates in use is allowed with a mandatory validation step from the Infrastructure Operator. For details, see Modify network configuration on an existing machine since 2.19.0.
Before Container Cloud 2.19.0, 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. Since Container Cloud 2.19.0, you can modify an existing L2 template. Both modification methods require a validation step from the Infrastructure Operator. For details, see Modify network configuration on an existing machine since 2.19.0.
To modify network configuration on an existing machine before 2.19.0:
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 <ipamhostName>
spec: l2TemplateSelector: name: <newL2TemplateName>
Save the edited YAML file to apply the change to the