Before creating an L2 template, ensure that you have the required subnets
that can be used in the L2 template to allocate IP addresses for the
managed cluster nodes.
Where required, create a number of subnets for a particular project
Subnet CR. A subnet has three logical scopes:
global - CR uses the
defaultnamespace. A subnet can be used for any cluster located in any project.
namespaced - CR uses the namespace that corresponds to a particular project where managed clusters are located. A subnet can be used for any cluster located in the same project.
cluster - CR uses the namespace where the referenced cluster is located. A subnet is only accessible to the cluster that
L2Template.spec.clusterRefrefers to. The
Subnetobjects with the
clusterscope will be created for every new cluster.
You can have subnets with the same name in different projects. In this case, the subnet that has the same project as the cluster will be used. One L2 template may often reference several subnets, those subnets may have different scopes in this case.
The IP address objects (
IPaddr CR) that are allocated from subnets
always have the same project as their corresponding
regardless of the subnet scope.
You can create subnets using either the Container Cloud web UI or CLI.