Hey guys, we are experiencing a really strange issue when using Keycloak with a frontend application. Keycloak is deployed via the keycloak helm chart from codecentric: helm-charts/charts/keycloak at master · codecentric/helm-charts · GitHub
Helm chart: 8.2.2
Client-Library: keycloak-angular in version 8.1.0 (keycloak-angular - npm)
Yeah, some of these are very old versions, but we currently have no control over the Kubernetes version.
What’s the problem?
When having Keycloak deployed with one replica in the stateful set, everything is working fine.
However, when we scale up to 2 replicas, we experience a CORS error (MissingAllowOriginHeader) when requesting the account endpoint from Keycloak via the browser (which the keycloak-angular library does automatically). When checking the response from the server, there is really no “Access-Control-Allow-Origin” header sent to the browser.
This only happens when having more than 1 replicas.
Do you have any idea, why that might happen?
I would appreciate any hint in the right direction Thanks in advance.