Expand IP addresses capacity in an existing cluster¶
If the subnet capacity on your existing cluster is not enough to add new
machines, use the l2TemplateSelector feature to expand the IP addresses
capacity:
Create new Subnet object(s) to define additional address ranges for new
machines.
Set up routing between the existing and new subnets.
Create new L2 template(s) with the new subnet(s) being used in l3Layout.
Set up l2TemplateSelector in the Machine objects for new machines.
To expand IP addresses capacity for an existing cluster:
Verify the capacity of the subnet(s) currently associated with
the L2 template(s) used for cluster deployment:
If labelSelector is not used for the given subnet, use the
namespace value of the L2 template and the subnetName value
from the l3Layout section:
kubectlgetsubnet-n<namespace><subnetName>
If labelSelector is used for the given subnet, use the namespace
value of the L2 template and comma-separated key-value pairs from the
labelSelector section for the given subnet in the l3Layout
section:
The kaas.mirantis.com/region label is removed from all
Container Cloud and MOSK objects in 24.1.
Therefore, do not add the label starting with these releases. On existing
clusters updated to these releases, or if added manually, Container Cloud
ignores this label.
The kaas.mirantis.com/region label is removed from all
Container Cloud and MOSK objects in 24.1.
Therefore, do not add the label starting with these releases. On existing
clusters updated to these releases, or if added manually, Container Cloud
ignores this label.
Note
Before MOSK 23.3, an L2 template requires
clusterRef:<clusterName> in the spec section. Since MOSK 23.3,
this parameter is deprecated and automatically migrated to the
cluster.sigs.k8s.io/cluster-name:<clusterName> label.
Create new objects:
Subnet with the user-defined/purpose:lcm-additional label.
L2Template with the alternative-template:“1” label.
The L2 template should reference the new Subnet object using the
user-defined/purpose:lcm-additional label in the labelSelector
field.
Note
The label name user-defined/purpose is used for illustration
purposes. Use any custom label name that differs from system names.
Use of a unique prefix such as user-defined/ is recommended.
The kaas.mirantis.com/region label is removed from all
Container Cloud and MOSK objects in 24.1.
Therefore, do not add the label starting with these releases. On existing
clusters updated to these releases, or if added manually, Container Cloud
ignores this label.
The kaas.mirantis.com/region label is removed from all
Container Cloud and MOSK objects in 24.1.
Therefore, do not add the label starting with these releases. On existing
clusters updated to these releases, or if added manually, Container Cloud
ignores this label.
Note
Before MOSK 23.3, an L2 template requires
clusterRef:<clusterName> in the spec section. Since MOSK 23.3,
this parameter is deprecated and automatically migrated to the
cluster.sigs.k8s.io/cluster-name:<clusterName> label.
You can also reference the new Subnet object by using its name
in the l3Layout section of the alternative-template L2 template.
The kaas.mirantis.com/region label is removed from all
Container Cloud and MOSK objects in 24.1.
Therefore, do not add the label starting with these releases. On existing
clusters updated to these releases, or if added manually, Container Cloud
ignores this label.
After creation, the new machine will use the alternative
L2 template that uses the new-lcm-network subnet linked by L3Layout.
Optional. Configure an additional IP address pool for MetalLB:
Since MOSK 24.2
Configure the additional extension IP address pool for the
metallb load balancer service.
Open the MetalLBConfig object of the management cluster for
editing:
In the snippet above, replace the following parameters:
<pool_start_ip> - first IP address in the required range
<pool_end_ip> - last IP address in the range
Add the extension IP address pool name to the L2Advertisements
definition. You can add it to the same L2 advertisement as the
default IP address pool, or create a new L2 advertisement
if required.
Define additional address ranges for MetalLB. For details, see the
optional step for the MetalLB service in create-subnet-cli.
You can create one or several Subnet objects to extend the MetalLB
address pool with additional ranges. When the MetalLB traffic is routed
through the default gateway, you can add the MetalLB address ranges that
belong to different CIDR subnet addresses.
The kaas.mirantis.com/region label is removed from all
Container Cloud and MOSK objects in 24.1.
Therefore, do not add the label starting with these releases. On existing
clusters updated to these releases, or if added manually, Container Cloud
ignores this label.