$ rosa create machinepool --cluster=<cluster-name> \
--name=<machine_pool_id> \
--replicas=<replica_count> \
--instance-type=<instance_type> \
--labels=<key>=<value>,<key>=<value> \
--taints=<key>=<value>:<effect>,<key>=<value>:<effect> \
--use-spot-instances \
--spot-max-price=<price> \
--disk-size=<disk_size> \
--availability-zone=<availability_zone_name> \
--additional-security-group-ids <sec_group_id> \
--subnet <subnet_id>
where:
--name=<machine_pool_id>
-
Specifies the name of the machine pool.
--replicas=<replica_count>
-
Specifies the number of compute nodes to provision. If you deployed ROSA using a single availability zone, this defines the number of compute nodes to provision to the machine pool for the zone. If you deployed your cluster using multiple availability zones, this defines the number of compute nodes to provision in total across all zones and the count must be a multiple of 3. The
--replicas
argument is required when autoscaling is not configured. --instance-type=<instance_type>
-
Optional: Sets 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 ism5.xlarge
. You cannot change the instance type for a machine pool after the pool is created. --labels=<key>=<value>,<key>=<value>
-
Optional: Defines the labels for the machine pool. Replace
<key>=<value>,<key>=<value>
with a comma-delimited list of key-value pairs, for example--labels=key1=value1,key2=value2
. --taints=<key>=<value>:<effect>,<key>=<value>:<effect>
-
Optional: Defines the taints for the machine pool. Replace
<key>=<value>:<effect>,<key>=<value>:<effect>
with a key, value, and effect for each taint, for example--taints=key1=value1:NoSchedule,key2=value2:NoExecute
. Available effects includeNoSchedule
,PreferNoSchedule
, andNoExecute
. --use-spot-instances
-
Optional: Configures your machine pool to deploy machines as non-guaranteed AWS Spot Instances. For information, see Amazon EC2 Spot Instances in the AWS documentation. If you select Use Amazon EC2 Spot Instances for a machine pool, you cannot disable the option after the machine pool is created.
--spot-max-price=<price>
-
Optional: If you choose to use Spot Instances, you can specify this argument to define a maximum hourly price for a Spot Instance. If this argument is not specified, the on-demand price is used.
Your Amazon EC2 Spot Instances might be interrupted at any time. Use Amazon EC2 Spot Instances only for workloads that can tolerate interruptions.
--disk-size=<disk_size>
-
Optional: Specifies the worker node disk size. The value can be in GB, GiB, TB, or TiB. Replace
<disk_size>
with a numeric value and unit, for example--disk-size=200GiB
. --availability-zone=<availability_zone_name>
-
Optional: For Multi-AZ clusters, you can create a machine pool in a Single-AZ of your choice. Replace
<availability_zone_name>
with a Single-AZ name.Multi-AZ clusters retain a Multi-AZ control plane and can have worker machine pools across a Single-AZ or Multi-AZ. Machine pools distribute machines (nodes) evenly across availability zones.
If you choose a worker machine pool with a Single-AZ, there is no fault tolerance for that machine pool, regardless of machine replica count. For fault-tolerant worker machine pools, choosing a Multi-AZ machine pool distributes machines in multiples of 3 across availability zones.
-
A Multi-AZ machine pool with three availability zones can have a machine count in multiples of 3 only, such as 3, 6, 9, and so on.
-
A Single-AZ machine pool with one availability zone can have a machine count in multiples of 1, such as 1, 2, 3, 4, and so on.
-
--additional-security-group-ids <sec_group_id>
-
Optional: For machine pools in clusters that do not have Red Hat managed VPCs, you can select additional custom security groups to use in your machine pools. You must have already created the security groups and associated them with the VPC that you selected for this cluster. You cannot add or edit security groups after you create the machine pool. For more information, see the requirements for security groups in the "Additional resources" section.
--subnet <subnet_id>
-
Optional: For BYO VPC clusters, you can select a subnet to create a Single-AZ machine pool. If the subnet is out of your cluster creation subnets, there must be a tag with a key
kubernetes.io/cluster/<infra-id>
and valueshared
. Customers can obtain the Infra ID by using the following command:$ rosa describe cluster -c <cluster name>|grep "Infra ID:"
Example outputInfra ID: mycluster-xqvj7
You cannot set both
--subnet
and--availability-zone
at the same time, only 1 is allowed for a Single-AZ machine pool creation.