Cloud Experts Documentation

Scalability and Cost Management for Azure Red Hat OpenShift

This content is authored by Red Hat experts, but has not yet been tested on every supported configuration. This guide has been validated on OpenShift 4.20. Operator CRD names, API versions, and console paths may differ on other versions.

With Azure Red Hat OpenShift (ARO), you can take advantage of flexible pricing models, including pay-as-you-go and reserved instances, to further optimize your cloud spending. Its auto-scaling capabilities help reduce costs by avoiding over-provisioning, making it a cost-effective solution for organizations seeking to balance performance and expenditure.

This guide demonstrates how to implement scheduled scaling in Azure Red Hat OpenShift (ARO), enabling your cluster to automatically adjust its size according to a predefined schedule. By configuring scale-downs during periods of low activity and scale-ups when additional resources are needed, you can ensure both cost efficiency and optimal performance.

Leveraging ARO’s automated scaling capabilities allows for dynamic adjustment of worker node capacity, eliminating wasteful spending on idle infrastructure resources. This approach reduces the need for manual intervention and ensures consistent compute resources for both traditional workloads and AI/ML operations during peak hours.

Prerequisites

  • Install oc CLI
  • Azure Red Hat OpenShift (ARO) cluster

Note: You must log into your ARO cluster via your oc CLI before going through the following steps.

Create a New project and Service Account

  1. Create a new project

  2. Create the service account

Create RBAC Resources

  1. Create the ClusterRole to grant permissions

  2. Create the ClusterRoleBinding

Create the Scaling Script

  1. Set Environment Variables

    • DESIRED_REPLICAS: Number of replicas per machineset (default: 3)
    • MACHINESET_LABEL: Label selector for machinesets (default: worker role)
  2. Create a ConfigMap containing the scaling script:

Create the CronJob

Adjust the cron expression as needed.

  • "0 8 * * *" - Daily at 8:00 AM
  • "0 8 * * 1-5" - Weekdays at 8:00 AM
  • "0 8,20 * * *" - Daily at 8:00 AM and 8:00 PM
  • "*/30 * * * *" - Every 30 minutes
  1. Create a Scale-Up CronJob:

  2. Create a Scale-Down CronJob:

Verify the Setup

  1. Verify service account

    Example output:

  2. Verify RBAC

    Example output:

  3. Verify ConfigMap

    Example output:

  4. Verify CronJob

    Example output:

Test the CronJob

  1. Manually trigger a Job from the CronJob to test it without waiting for the scheduled time.

  2. Check the job status

    Example output:

  3. Check the pod logs

Confirm scaling results

Once the job is done, monitor the machineset, machines, and node statuses to ensure the cluster is scaling as expected.

  1. Check machinesets

  2. Check machines

  3. Check nodes

Back to top

Interested in contributing to these docs?

Collaboration drives progress. Help improve our documentation The Red Hat Way.

Red Hat logo LinkedIn YouTube Facebook Twitter

Products

Tools

Try, buy & sell

Communicate

About Red Hat

We’re the world’s leading provider of enterprise open source solutions—including Linux, cloud, container, and Kubernetes. We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Subscribe to our newsletter, Red Hat Shares

Sign up now
© 2026 Red Hat