Edit and apply L2 templates¶
To add L2 templates to a MOSK cluster:
Log in to a local machine where your management cluster
kubeconfigis located and where
The management cluster
kubeconfigis created during the last stage of the management cluster bootstrap.
Add the L2 template to your management cluster:
kubectl --kubeconfig <pathToManagementClusterKubeconfig> apply -f <pathToL2TemplateYamlFile>
Inspect the existing L2 templates to see if any one fits your deployment:
kubectl --kubeconfig <pathToManagementClusterKubeconfig> \ get l2template -n <ProjectNameForNewManagedCluster>
kubectl --kubeconfig <pathToManagementClusterKubeconfig> \ -n <ProjectNameForNewManagedCluster> edit l2template <L2templateName>
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.