Search

Appendix B. Generating Keycloak host names automatically

download PDF

OpenShift routes has support for automatically generating host names by using a set pattern. This feature can integrate with Red Hat’s build of Keycloak (RHBK) operator running on OpenShift.

Prerequisites

  • OpenShift Container Platform version 4.13, 4.14, or 4.15.
  • Installation of the RHBK operator.
  • Access to the OpenShift web console with the cluster-admin role.
  • A workstation with the oc binary installed.

Procedure

  1. Enable the automatically generated route hostname feature.

    1. Under the .spec section, remove the entire hostname section, and replace it with the ingress section and className property within the Keycloak resource:

      Example

      spec:
      ...
        hostname:
          hostname: example.com
      ...

      Example

      spec:
      ...
        ingress:
          className: openshift-default
      ...

      Note

      To view all of the available Ingress classes, run the following command:

      $ oc get ingressclass
    2. Click the Save button.
  2. Verify the automatically generated hostname by clicking the Reload button to view the latest configuration:

    Example

    spec:
    ...
      hostname:
        hostname: example-keycloak-ingress-keycloak-system.apps.rhtas.example.com
    ...

Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.