此内容没有您所选择的语言版本。
Appendix B. Generating Keycloak host names automatically
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
- Red Hat OpenShift Container Platform version 4.13 or later.
- Installation of the RHBK operator.
-
Access to the OpenShift web console with the
cluster-adminrole. -
A workstation with the
ocbinary installed.
Procedure
Enable the automatically generated route hostname feature.
Under the
.specsection, remove the entirehostnamesection, and replace it with theingresssection andclassNameproperty within theKeycloakresource:Example
spec: ... hostname: hostname: example.com ...Example
spec: ... ingress: className: openshift-default ...NoteTo view all of the available Ingress classes, run the following command:
$ oc get ingressclass- Click the Save button.
Verify the automatically generated
hostnameby clicking the Reload button to view the latest configuration:Example
spec: ... hostname: hostname: example-keycloak-ingress-keycloak-system.apps.rhtas.example.com ...