Skip to content

Commit 238aed8

Browse files
authored
Merge pull request #103901 from otikhomi/OSDOCS-17665-updating-capacity-reservations-cli-docs
OSDOCS-17665: Updating Capacity Reservations docs (ROSA HCP)
2 parents 8d5b5b6 + 8e7e738 commit 238aed8

File tree

2 files changed

+21
-14
lines changed

2 files changed

+21
-14
lines changed

modules/creating-a-machine-pool-cli-capres.adoc

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,32 @@
66
[id="creating_machine_pools_cli_capres_{context}"]
77
= Creating a machine pool with Capacity Reservations using the {rosa-cli}
88

9+
[role="_abstract"]
910
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.
1011

1112
[NOTE]
1213
====
13-
Currently, upgrading machine pools and enabling autoscaling is not suppored on machine pools with Capacity Reservations.
14+
Currently, autoscaling is not supported on machine pools with Capacity Reservations.
1415
====
1516

1617
.Prerequisites
1718

18-
* You installed and configured the {rosa-cli} version 1.2.57 or above.
19+
* You installed and configured the latest {rosa-cli}.
1920
* You logged in to your Red{nbsp}Hat account using the {rosa-cli}.
2021
* You created a {product-title} cluster version 4.19 or above.
2122
* 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.
2223
* 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.
2324
2425
.Procedure
2526

26-
* Create the machine pool and define the instance type, worker node count, and Capacity Reservation ID by running the following command:
27+
* Create the machine pool and define the Capacity Reservation preference and ID by running the following command:
2728
+
28-
--
2929
[source,terminal]
3030
----
31-
$ rosa create machinepool --cluster=<cluster-name> \
31+
$ rosa create machinepool --cluster=<cluster_name> \
3232
--name=<machine_pool_id> \
3333
--replicas=<replica_count> \
34+
--capacity-reservation-preference none | open | capacity-reservations-only \
3435
--capacity-reservation-id cr-<capacity_reservation_id> \
3536
--instance-type=<instance_type> \
3637
--subnet <subnet_id>
@@ -40,9 +41,15 @@ where:
4041

4142
*<machine_pool_id>*:: Specifies the name of the machine pool.
4243
*<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.
44+
*<capacity_reservation_preference>*:: Specifies the Capacity Reservation behaviour. Valid preferences include:
45+
46+
* `none`: The instance does not use a Capacity Reservation even if one is available. The instance runs as an EC2 On-Demand instance. Choose this option when you want to avoid consuming purchased reserved capacity and use it for other workloads.
47+
* `open`: The instance can run in any `open` Capacity Reservation that has matching attributes such as the instance type, platform, AZ, or tenancy. Choose this option for flexibility; if a reservation is not available, the instance can use regular unreserved EC2 capacity.
48+
* `capacity-reservations-only`: The instance can only run in a Capacity Reservation. If capacity is not available, the instance fails to launch.
49+
4350
*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.
4451
*<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.
45-
*<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:
52+
*<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:
4653
+
4754
[source,terminal]
4855
----
@@ -54,7 +61,6 @@ $ rosa describe cluster --cluster <cluster_name>|grep "Infra ID:"
5461
----
5562
Infra ID: mycluster-xqvj7
5663
----
57-
--
5864

5965
.Example
6066

@@ -94,7 +100,7 @@ $ rosa describe machinepool --cluster <cluster_name> --machinepool <machine_pool
94100
[source,terminal]
95101
----
96102
ID: <machine_pool_name>
97-
Cluster ID: <cluster-id>
103+
Cluster ID: <cluster_id>
98104
Autoscaling: No
99105
Desired replicas: 1
100106
Current replicas: 1
@@ -103,7 +109,7 @@ Labels:
103109
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
104110
Taints:
105111
Availability zone: us-east-1a
106-
Subnet: <subnet-id>
112+
Subnet: <subnet_id>
107113
Disk Size: 300 GiB
108114
Version: 4.19.10
109115
EC2 Metadata Http Tokens: optional
@@ -113,13 +119,14 @@ Kubelet configs:
113119
Additional security group IDs:
114120
Node drain grace period:
115121
Capacity Reservation:
116-
- ID: <capacity-reservation-id>
122+
- ID: <capacity_reservation_id>
117123
- Type: OnDemand
124+
- Preference: open
118125
Management upgrade:
119126
- Type: Replace
120127
- Max surge: 1
121128
- Max unavailable: 0
122129
Message: Minimum availability requires 1 replicas, current 1 available
123130
----
124131
+
125-
The output should include the Capacity Reservation ID and type.
132+
The output should include the Capacity Reservation ID, type, and preference.

rosa_cluster_admin/rosa_nodes/rosa-managing-worker-nodes.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ include::_attributes/attributes-openshift-dedicated.adoc[]
55
:context: rosa-managing-worker-nodes
66
toc::[]
77

8-
This document describes how to manage compute (also known as worker) nodes with {product-title}.
8+
[role="_abstract"]
9+
With {product-title}, you can manage compute (also known as worker) nodes to create and configure optimal compute capacity for your workloads.
910

1011
The majority of changes for compute nodes are configured on machine pools. A machine pool is a group of compute nodes in a cluster that have the same configuration, providing ease of management.
1112

@@ -24,13 +25,12 @@ Once you configure Capacity Reservations in {product-title}, you can use your AW
2425

2526
Using Capacity Reservations on machine pools in {product-title} clusters has the following prerequisites and limitations:
2627

27-
* You have installed the {rosa-cli} version 1.2.57 or above.
28+
* You installed and configured the latest {rosa-cli}.
2829
* Your {product-title} cluster is version 4.19 or later.
2930
* 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.
3031
* You have purchased a Capacity Reservation for the instance type required in the AZ of the machine pool that you are creating.
3132
* You can only add a Capacity Reservation ID to a new machine pool.
3233
* You cannot use autoscaling on a machine pool with configured Capacity Reservations.
33-
* You cannot upgrade a machine pool with configured Capacity Reservations.
3434
3535
To create a machine pool with a Capacity Reservation, see xref:../../rosa_cluster_admin/rosa_nodes/rosa-managing-worker-nodes.adoc#creating_machine_pools_cli_capres_rosa-managing-worker-nodes[Creating a machine pool with Capacity Reservations using the {rosa-cli}].
3636
endif::openshift-rosa-hcp[]

0 commit comments

Comments
 (0)