Create a project for a managed cluster using the Container Cloud web UI:
Log in to the Container Cloud web UI as m:kaas@global-admin or
m:kaas@writer.
In the Projects tab, click Create.
Type the new project name.
Click Create.
Note
The default project (Kubernetes namespace) in Container Cloud is
dedicated for management clusters only. Managed clusters require a separate
project. You can create as many projects as required by your company
infrastructure.
Log in to the host where your management cluster kubeconfig is located
and where kubectl is installed.
Describe the unique credentials of the new bare metal host:
MOSK 22.5 and later
Create a YAML file that describes the unique credentials of the new
bare metal host as a BareMetalHostCredential object.
In the metadata section, add a unique credentials name and the
name of the non-default project (namespace) dedicated for the
managed cluster being created.
In the spec section, add the IPMI user name and password in plain
text to access the Baseboard Management Controller (BMC). The password
will not be stored in the BareMetalHostCredential object but will
be erased and saved in an underlying Secret object.
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.
MOSK 22.4 and earlier
Create a secret YAML file that describes
the unique credentials of the new bare metal host.
Example of the bare metal host secret:
In the data section, add the IPMI user name and password in the
base64 encoding to access the BMC. To obtain the base64-encoded
credentials, you can use the following command in your Linux console:
echo-n<username|password>|base64
Caution
Each bare metal host must have a unique Secret.
In the metadata section, add the unique name of credentials and
the name of the non-default project (namespace) dedicated for
the managed cluster being created.
Apply this secret YAML file to your deployment:
Warning
The kubectl apply command automatically saves the
applied data as plain text into the
kubectl.kubernetes.io/last-applied-configuration annotation of the
corresponding object. This may result in revealing sensitive data in this
annotation when creating or modifying the object.
Therefore, do not use kubectl apply on this object.
Use kubectl create, kubectl patch, or
kubectl edit instead.
If you used kubectl apply on this object, you
can remove the kubectl.kubernetes.io/last-applied-configuration
annotation from the object using kubectl edit.
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
If you have a limited amount of free and unused IP addresses
for server provisioning, you can add the
baremetalhost.metal3.io/detached annotation that pauses automatic
host management to manually allocate an IP address for the host. For
details, see Manually allocate IP addresses for bare metal hosts.
During provisioning, baremetal-operator inspects the bare metal host
and moves it to the Preparing state. The host becomes ready to be linked
to a bare metal machine.
Caution
If changing or adding of DHCP subnets is required to bootstrap
new nodes, wait after changing or adding of DHCP subnets until the
dnsmasq pod becomes ready, then create BareMetalHost objects.
During provisioning, the status changes as follows:
registering
inspecting
preparing
After BareMetalHost switches to the preparing stage, the
inspecting phase finishes and you can verify that hardware information
is available in the object status and matches the MOSK cluster hardware requirements.
For example: