-
Notifications
You must be signed in to change notification settings - Fork 1.8k
OSDOCS-14809: Capacity Reservations in ROSA HCP #100445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
jneczypor
merged 1 commit into
openshift:main
from
otikhomi:OSDOCS-14809-adding-capacity-reservations-rosa-hcp
Oct 22, 2025
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,124 @@ | ||
| // Module included in the following assemblies: | ||
| // | ||
| // * rosa_cluster_admin/rosa_nodes/rosa-managing-worker-nodes.adoc | ||
|
|
||
| :_mod-docs-content-type: PROCEDURE | ||
| [id="creating_machine_pools_cli_capres_{context}"] | ||
| = Creating a machine pool with Capacity Reservations using the {rosa-cli} | ||
|
|
||
| You can create a new machine pool with Capacity Reservations by using the {rosa-cli-first}. Both On-Demand Capacity Reservations and Capacity Blocks for ML are supported. | ||
|
|
||
| [NOTE] | ||
| ==== | ||
| Currently, upgrading machine pools and enabling autoscaling is not suppored on machine pools with Capacity Reservations. | ||
| ==== | ||
|
|
||
| .Prerequisites | ||
|
|
||
| * You installed and configured the {rosa-cli} version 1.2.57 or above. | ||
| * You logged in to your Red{nbsp}Hat account using the {rosa-cli}. | ||
| * You created a {product-title} cluster version 4.19 or above. | ||
| * The cluster already has a machine pool that is not using a Capacity Reservation or taints. The machine pool must have at least 2 worker nodes. | ||
| * You have a Capacity Reservation ID and capacity is reserved for the instance type required in the Availability Zone (AZ) of the machine pool that you are creating. | ||
|
|
||
| .Procedure | ||
|
|
||
| * Create the machine pool and define the instance type, worker node count, and Capacity Reservation ID by running the following command: | ||
| + | ||
| -- | ||
| [source,terminal] | ||
| ---- | ||
| $ rosa create machinepool --cluster=<cluster-name> \ | ||
| --name=<machine_pool_id> \ | ||
| --replicas=<replica_count> \ | ||
| --capacity-reservation-id cr-<capacity_reservation_id> \ | ||
| --instance-type=<instance_type> \ | ||
| --subnet <subnet_id> | ||
| ---- | ||
|
|
||
| where: | ||
|
|
||
| *<machine_pool_id>*:: Specifies the name of the machine pool. | ||
| *<replica_count>*:: Specifies the number of provisioned compute nodes. If you deploy {product-title} using a single AZ, this defines the number of compute nodes provisioned to the machine pool for the AZ. If you deploy your cluster using multiple AZs, this defines the total number of compute nodes provisioned across all AZs. For multi-zone clusters, the compute node count must be a multiple of 3. The `--replicas` argument is required when autoscaling is not configured. | ||
| *cr-<capacity_reservation_id>*:: Specifies the reservation ID. You get an ID in the `cr-<capacity_reservation_id>` format when you purchase a Capacity Reservation from AWS. The ID can be for both On-Demand Capacity Reservations or Capacity Blocks for ML, you do not need to specify the reservation type. | ||
| *<instance_type>*:: *Optional*: Specifies the instance type for the compute nodes in your machine pool. The instance type defines the vCPU and memory allocation for each compute node in the pool. Replace `<instance_type>` with an instance type. The default is `m5.xlarge`. You cannot change the instance type for a machine pool after the pool is created. | ||
| *<subnet_id>*:: *Optional*: Specifies the subnet ID. For Bring Your Own Virtual Private Cloud (BYO VPC) clusters, you can select a subnet to create a single-AZ machine pool. If you select a subnet that was not specified during the initial cluster creation, you must tag the subnet with the `kubernetes.io/cluster/<infra-id>` key and `shared` value. Customers can obtain the Infra ID by running the following command: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ rosa describe cluster --cluster <cluster_name>|grep "Infra ID:" | ||
| ---- | ||
| + | ||
| .Example output | ||
| [source,terminal] | ||
| ---- | ||
| Infra ID: mycluster-xqvj7 | ||
| ---- | ||
| -- | ||
|
|
||
| .Example | ||
|
|
||
| The following example creates a machine pool called `mymachinepool` that uses the `c5.xlarge` instance type and has 1 compute node replica. The example also adds a Capacity Reservation ID. Example input and output: | ||
|
|
||
otikhomi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| [source,terminal] | ||
| ---- | ||
| $ rosa create machinepool --cluster=mycluster --name=mymachinepool --replicas 1 --capacity-reservation-id <capacity_reservation_id> --subnet <subnet_id> --instance-type c5.xlarge | ||
| ---- | ||
|
|
||
| [source,terminal] | ||
| ---- | ||
| I: Checking available instance types for machine pool 'mymachinepool' | ||
| I: Machine pool 'mymachinepool' created successfully on hosted cluster 'mycluster' | ||
| ---- | ||
|
|
||
| .Verification | ||
|
|
||
| You can list all machine pools on your cluster or describe individual machine pools. | ||
|
|
||
| * List the available machine pools on your cluster by running the following command: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ rosa list machinepools --cluster <cluster_name> | ||
| ---- | ||
|
|
||
| * Describe the information of a specific machine pool in your cluster by running the following command. | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ rosa describe machinepool --cluster <cluster_name> --machinepool <machine_pool_name> | ||
| ---- | ||
| + | ||
| .Example output | ||
| [source,terminal] | ||
| ---- | ||
| ID: <machine_pool_name> | ||
| Cluster ID: <cluster-id> | ||
| Autoscaling: No | ||
| Desired replicas: 1 | ||
| Current replicas: 1 | ||
| Instance type: c5.xlarge | ||
| Labels: | ||
| Tags: red-hat-managed=true, api.openshift.com/environment=production, api.openshift.com/id=<cluster_name>, api.openshift.com/legal-entity-id=<legal_entity_id>, api.openshift.com/name=<cluster_name>, api.openshift.com/nodepool-hypershift=<cluster_name>-<machine_pool_name>, api.openshift.com/nodepool-ocm=<machine_pool_name>, red-hat-clustertype=rosa | ||
| Taints: | ||
| Availability zone: us-east-1a | ||
| Subnet: <subnet-id> | ||
| Disk Size: 300 GiB | ||
| Version: 4.19.10 | ||
| EC2 Metadata Http Tokens: optional | ||
| Autorepair: Yes | ||
| Tuning configs: | ||
| Kubelet configs: | ||
| Additional security group IDs: | ||
| Node drain grace period: | ||
| Capacity Reservation: | ||
| - ID: <capacity-reservation-id> | ||
| - Type: OnDemand | ||
| Management upgrade: | ||
| - Type: Replace | ||
| - Max surge: 1 | ||
| - Max unavailable: 0 | ||
| Message: Minimum availability requires 1 replicas, current 1 available | ||
| ---- | ||
| + | ||
| The output should include the Capacity Reservation ID and type. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.