Keycloak 17 external Infinispan cluster

In key cloak 16.1 and prior based on wildfly it was possible to configure keycloak to use an external Infinispan cluster (like in Keycloak - Search) but this guide no longer applies to the quarkus distribution.

Is it still possible to configure keycloak 17 to use an external cluster? Could anyone point me to the right docs to set it up?

I managed to get keycloak to join an external cluster but it actually participates in the cluster and storing objects in the cluster fails since it does not serialise them so the infinispan server throw Class not found exceptions.

Apparently it is still used in Keycloak X, and I think they are embracing Infinispan even more.
Are you trying with the regular release train with Wildfly?

Hi cristicalin,

Thomas Darimont updated and published an example here : keycloak-project-example/deployments/local/clusterx/haproxy-external-ispn at main · thomasdarimont/keycloak-project-example · GitHub

We were able to test connection to an external ISPN cluster with KC 17 Quarkus distribution. :wink:

2 Likes

Indeed this works, thank you for pointing me on the right direction @ddy!

Hi,

I am also trying to setup an external infinispan cluster and configure keycloak to interact with the external infinispan cluster on Kubernetes.

Now, I am using Keycloak 18.0.0 (Quarkus) version and its caching the data to the keycloak pods itself.

Configurations are:
KC_CACHE_STACK=kubernetes
JAVA_OPTS_APPEND = -headless.keycloak.svc.cluster.local

How would I configure the infinispan cluster in kubernates and then configure it to interact with keycloak pods? If there is any examples available, please share.