Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
OpenShift Container Platform version 4.18 and later supports on-demand Capacity Reservation with Capacity Reservation groups on Microsoft Azure Red Hat OpenShift clusters.
You can configure a machine set to deploy machines on any available resources that match the parameters of a capacity request that you define. These parameters specify the VM size, region, and number of instances that you want to reserve. If your Azure subscription quota can accommodate the capacity request, the deployment succeeds.
For more information, including limitations and suggested use cases for this Azure instance type, see On-demand Capacity Reservation.
Note
You can't change an existing Capacity Reservation configuration for a machine set. To use a different Capacity Reservation group, you must replace the machine set and the machines that the previous machine set deployed. Capacity reservations aren't supported at the time of cluster creation.
Prerequisites
- You have access to the cluster with
cluster-adminprivileges. - You installed the OpenShift CLI (
oc). - You created a Capacity Reservation group.
For more information, see Associate a capacity reservation to a VM.
Procedure
In a text editor, open the YAML file for an existing machine set or create a new one.
Edit the following section under the
providerSpecfield:apiVersion: machine.openshift.io/v1beta1 kind: MachineSet # ... spec: template: spec: providerSpec: value: capacityReservationGroupID: <capacity_reservation_group> # ...Specify the ID of the Capacity Reservation group that you want the machine set to deploy machines on.
Verification
To verify the machine deployment, list the machines that the machine set created by running the following command. Replace <machine_set_name> with the name of the compute machine set:
oc get machines.machine.openshift.io \
-n openshift-machine-api \
-l machine.openshift.io/cluster-api-machineset=<machine_set_name>
In the output, verify that the characteristics of the listed machines match the parameters of your capacity reservation.