I deployed Keycloak server in kubernetes using the operator, following the official docs. All is working well but I am able to deploy a second Keycloak CR without installing a different operator. I need this setup to have both prod and dev Keycloak servers.
Most of the issues stem from me using an external database for the setup. (a must)
What I tried:
- deploying the Keycloak server with all the CR and dependent resource names changed i.e. a “-dev” suffix was added to the; Keycloak CR, Keycloak database secret, Keycloak service. After creation, the Keycloak CR is attached to the wrong Postgres service i.e.
keycloak-postgresql, though I set POSTGRES_HOST as
keycloak-postgresql-dev. The pod fails to start because of the conflict, since prod is already using
- creating a new namespace to avoid service name conflicts. Seems that
WATCH_NAMESPACEenv variable of the operator only takes one namespace at a time.
Any workarounds or clarifications are welcome. Thank you for your help.