mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
32 lines
1.4 KiB
Plaintext
32 lines
1.4 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// scalability_and_performance/managing-bare-metal-hosts.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="automatically-scaling-machines-to-available-bare-metal-hosts_{context}"]
|
|
= Automatically scaling machines to the number of available bare metal hosts
|
|
|
|
To automatically create the number of `Machine` objects that matches the number of available `BareMetalHost` objects, add a `metal3.io/autoscale-to-hosts` annotation to the `MachineSet` object.
|
|
|
|
.Prerequisites
|
|
|
|
* Install {op-system} bare metal compute machines for use in the cluster, and create corresponding `BareMetalHost` objects.
|
|
* Install the {product-title} CLI (`oc`).
|
|
* Log in as a user with `cluster-admin` privileges.
|
|
|
|
.Procedure
|
|
|
|
. Annotate the compute machine set that you want to configure for automatic scaling by adding the `metal3.io/autoscale-to-hosts` annotation. Replace `<machineset>` with the name of the compute machine set.
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc annotate machineset <machineset> -n openshift-machine-api 'metal3.io/autoscale-to-hosts=<any_value>'
|
|
----
|
|
+
|
|
Wait for the new scaled machines to start.
|
|
|
|
[NOTE]
|
|
====
|
|
When you use a `BareMetalHost` object to create a machine in the cluster and labels or selectors are subsequently changed on the `BareMetalHost`, the `BareMetalHost` object continues be counted against the `MachineSet` that the `Machine` object was created from.
|
|
====
|