Skip to content

Files

Latest commit

 

History

History
31 lines (24 loc) · 1.36 KB

automatically-scaling-machines-to-available-bare-metal-hosts.adoc

File metadata and controls

31 lines (24 loc) · 1.36 KB

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
  1. Annotate the 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 machine set.

    $ 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.