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.
Create a YAML file that contains a description of the new bare metal host:
Since the management cluster update to 16.4.0 (MCC 2.29.0)
Caution
While the Cluster release of the management cluster is 16.4.0,
BareMetalHostInventory operations are allowed to
m:kaas@management-admin only. This limitation is lifted once the
management cluster is updated to the Cluster release 16.4.1 or later.
apiVersion:kaas.mirantis.com/v1alpha1kind:BareMetalHostInventorymetadata:annotations:inspect.metal3.io/hardwaredetails-storage-sort-term:hctl ASC, wwn ASC, by_id ASC, name ASClabels:kaas.mirantis.com/baremetalhost-id:<unique-bare-metal-host-hardware-node-id>kaas.mirantis.com/provider:baremetalname:<bare-metal-host-unique-name>namespace:<managed-cluster-project-name>spec:bmc:address:<ip-address-for-bmc-access>bmhCredentialsName:<bare-metal-host-credential-unique-name>bootMACAddress:<bare-metal-host-boot-mac-address>online:true
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.
Before the management cluster update to 16.4.0 (MCC 2.29.0)
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 bare metal host objects as
described above.
During provisioning, the status changes as follows:
registering
inspecting
preparing
After the bare metal host object 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: