Managing Nodes

Managing Worker Nodes

When using your cluster there may be times when you need to change aspects of your worker nodes. Things like scaling, changing the type, adding labels or taints to name a few. Most of these things are done through the use of machine pools in ROSA. Think of a machine pool as a “template” for the kinds of machines that make up the worker nodes of your cluster. A machine pool allows users to manage many machines as a single entity.

Scaling worker nodes

To scale the number of worker nodes we need to edit the machine pool they belong to. The default machine pool is called “default” which is created with every cluster.

Step 1

View existing machine pools:

rosa list machinepools --cluster=<cluster-name>
You will see a response like:
default    No           2         m5.xlarge                         us-east-1a
Step 2

Scale up the by adding additional nodes.

rosa edit machinepool --cluster=<cluster-name> --replicas <number-worker-nodes> <machinepool-name>
For example:
`rosa edit machinepool --cluster=my-rosa-cluster --replicas 3 default`
Step 3

Confirm scaling

rosa describe cluster --cluster=<cluster-name>
You will see a response showing 3 compute nodes:
$ rosa describe cluster --cluster=my-rosa-cluster
Name:                       my-rosa-cluster
ID:                         1jgpoh4jm5jjiu12k12h000000000000
External ID:                a3fa460d-6405-48aa-ad24-000000000000
OpenShift Version:          4.7.2
Channel Group:              stable
AWS Account:                000000000000
API URL:          
Console URL:      
Region:                     us-east-1
Multi-AZ:                   false
 - Master:                  3
 - Infra:                   2
 - Compute:                 3 (m5.xlarge)
 - Service CIDR:  
 - Machine CIDR:  
 - Pod CIDR:      
 - Host Prefix:             /23
State:                      ready
Private:                    No
Created:                    Mar 19 2021 00:03:19 UTC
Details Page:     
Rosa init

This can also be confirmed by accessing OCM (<>) and selecting the cluster, on the overview tab, scroll down to the middle section under details you will see Compute listing "3/3".

Rosa init
Rosa init

This is a manual scaling action, either manually increasing or decreasing the number of worker nodes. See the AutoScaling module for info on how to enable dynamic scaling of compute resources.

Adding node labels

Node Lables allow for specific workloads to be placed in on certain nodes. This may be to place workloads on certain compute types such as GPU. This can also be helpful for performance sensitive workloads ensuring they run in same hosts. We can create a new machine pool to add the node labels to the worker nodes created by it.

Step 1

Create machinepool with a label.

rosa create machinepool --cluster=<cluster-name> --name=<mp-name> --replicas=<number-nodes> --labels=’<key=pair>
For example:
$ rosa create machinepool --cluster=my-rosa-cluster --name=db-nodes-mp --replicas=2 --labels='app=db','tier=backend'
I: Machine pool 'db-nodes-mp' created successfully on cluster 'my-rosa-cluster'
This will create an additional 2 nodes that can be managed as one unit and also assign them the labels shown.
Step 2

Confirm labels

rosa list machinepools --cluster=<cluster-name>
Rosa init

Using different node types

You cannot change the node type of a machine pool once created, but we can create a new machine pool with the larger nodes by adding the --instance-type flag.

Step 3

Create machine pool

rosa create machinepool --cluster=<cluster-name> --name=<mp-name> --replicas=<number-nodes> --labels=’<key=pair>’ --instance-type=<type>
For example:
`rosa create machinepool --cluster=my-rosa-cluster --name=db-nodes-large-mp --replicas=2 --labels='app=db','tier=backend' --instance-type=m5.2xlarge`

If you’d like to see all the [instance types available](, or to make the decisions step-by-step, then use the --interactive flag:

Step 4

Create machinepool interactive mode

rosa create machinepool -c <cluster-name> --interactive
Rosa init
  1. List the machine pools to see the new larger instance type

Rosa init