How to Enable and Automate Autoscaling for Red Hat Single Sign-On (RHSSO) Using HPA and Keycloak Operator CR"?

Solution Verified - Updated -

Issue

  • How to Enable and Automate Autoscaling for Red Hat Single Sign-On (RHSSO) Using HPA and Keycloak Operator CR"
  • After reinstalling Red Hat Single Sign-On (RHSSO) using oc apply -f keycloak.yaml, autoscaling must be manually enabled each time through the OpenShift Cluster Manager (OCM) GUI.

  • The customer wants to automate this process using code (GitOps/CI-CD automation) and avoid manual GUI steps.

  • The engineer confirmed that the "Enable Autoscale" button in OCM simply creates a HorizontalPodAutoscaler (HPA) resource in OpenShift.

  • When attempting to automate HPA creation using YAML (keycloak-hpa.yaml), the customer encountered conflicts between:

  • The instances: field defined in the Keycloak Custom Resource (CR), and

  • The minReplicas value defined in the HPA.

  • This conflict caused continuous pod creation and termination (HPA scaling vs. Operator overriding replicas).

Environment

  • Red Hat Single Sign-On
    • 7.6.11

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content