Skip to content

Scaling Worker Node Count in Azure Red Hat OpenShift (ARO)

This guide explains how to change the number of worker nodes in an ARO cluster by modifying the MachineSet replica count.

WARNING

You cannot scale worker nodes through Terraform or the Azure CLI. The azurerm_redhat_openshift_cluster Terraform resource treats the worker profile as a create-time property. Changing the node count forces a full cluster replacement. There is also no az aro CLI command to adjust the worker count after deployment. The only supported method is scaling the MachineSet resources directly through the OpenShift API.

How It Works

ARO creates one MachineSet per availability zone. A standard ARO deployment has a minimum of 3 availability zones, so you'll see at least 3 MachineSet resources. Each MachineSet controls the number of worker nodes in its respective AZ. To scale the cluster, you adjust the replica count on the MachineSet for the target availability zone.

Prerequisites

  • Access to the ARO cluster with cluster-admin privileges
  • The oc CLI tool installed and configured

Scale Worker Nodes

1. Switch to the machine API namespace

bash
oc project openshift-machine-api

2. List the available machinesets

bash
oc get machineset

Example output:

NAME                                      DESIRED   CURRENT   READY   AVAILABLE   AGE
aro-cluster-worker-westeurope1            1         1         1       1           30d
aro-cluster-worker-westeurope2            1         1         1       1           30d
aro-cluster-worker-westeurope3            1         1         1       1           30d

Each MachineSet corresponds to an availability zone. The DESIRED column shows the current replica count for that zone.

3. Scale the machineset

Use oc scale to change the replica count for the target MachineSet:

bash
oc scale machineset <machineset-name> --replicas=<count>

For example, to scale the first AZ from 1 to 3 workers:

bash
oc scale machineset aro-cluster-worker-westeurope1 --replicas=3

You can also scale multiple zones at once if you want an even distribution:

bash
oc scale machineset aro-cluster-worker-westeurope1 --replicas=2
oc scale machineset aro-cluster-worker-westeurope2 --replicas=2
oc scale machineset aro-cluster-worker-westeurope3 --replicas=2

TIP

Distribute replicas evenly across availability zones for better fault tolerance. If you need 6 workers total, run 2 per zone rather than putting all 6 in a single zone.

4. Verify the new nodes

Monitor the machines being provisioned:

bash
oc get machines -w

Once the machines are provisioned, verify the nodes have joined and are ready:

bash
oc get nodes -l node-role.kubernetes.io/worker

Scaling Down

The same command works for scaling down. When you reduce the replica count, the MachineSet controller will automatically select a machine to delete, drain its workloads, and remove the node from the cluster.

bash
oc scale machineset aro-cluster-worker-westeurope1 --replicas=1

IMPORTANT

Make sure you have enough capacity in the remaining nodes to handle the workloads before scaling down. Pods with PodDisruptionBudgets or node affinity rules may prevent a clean drain.

Troubleshooting

Check machineset status:

bash
oc get machineset <machineset-name> -o yaml

View machine events:

bash
oc describe machine <machine-name>

Check machine controller logs:

bash
oc logs -n openshift-machine-api deployment/machine-api-controllers -c machine-controller