Mirantis Container Cloud (MCC) becomes part of Mirantis OpenStack for Kubernetes (MOSK)!
Now, the MOSK documentation set covers all product layers, including MOSK management (formerly Container Cloud). This means everything you need is in one place. Some legacy names may remain in the code and documentation and will be updated in future releases. The separate Container Cloud documentation site will be retired, so please update your bookmarks for continued easy access to the latest content.
Assign L2 templates to machines¶
To deploy MOSK on bare metal, you must create L2 templates for each node type in the MOSK cluster. Additionally, you may have to create separate templates for nodes of the same type when they have different configuration.
To assign specific L2 templates to machines in a cluster:
Assign the templates to the cluster using the
cluster.sigs.k8s.io/cluster-namelabel in thelabelssection.Add a unique identifier label to every L2 template. Typically, that would be the name of the MOSK node role, for example
l2template-compute, orl2template-compute-5nics.Assign an L2 template to a machine. Set the
l2TemplateSelectorfield in the machine spec to the name of the label added in the previous step. IPAM Controller uses this field to use a specific L2 template for the corresponding machine.Alternatively, you may set the
l2TemplateSelectorfield to the name of the L2 template.
Consider the following examples of an L2 template assignment to a machine.
apiVersion: ipam.mirantis.com/v1alpha1
kind: L2Template
metadata:
name: example-node-netconfig
namespace: my-project
labels:
kaas.mirantis.com/provider: baremetal
l2template-example-node-netconfig: "1"
cluster.sigs.k8s.io/cluster-name: my-cluster
...
apiVersion: cluster.k8s.io/v1alpha1
kind: Machine
metadata:
name: machine1
namespace: my-project
labels:
cluster.sigs.k8s.io/cluster-name: my-cluster
...
...
spec:
providerSpec:
value:
l2TemplateSelector:
label: l2template-example-node-netconfig
...
apiVersion: cluster.k8s.io/v1alpha1
kind: Machine
metadata:
name: machine1
namespace: my-project
labels:
cluster.sigs.k8s.io/cluster-name: my-cluster
...
...
spec:
providerSpec:
value:
l2TemplateSelector:
name: example-node-netconfig
...
Now, proceed to Deploy a machine to a specific bare metal host.