Question on how the --import-realm on start works

I’m in the middle of converting our keycloak 19 legacy setup over to quarkus. Currently we are using the upload_scripts feature to import realm data for local development. Since this feature is deprecated, I’m looking to move to something else.

My question is does this --import-realm command rely on the keycloak realm operator to import this data? Our current local dev setup doesn’t have the operators running. We’ve hoping to eventually be on a full local kubernetes setup for local dev where the operator will be running, but thats probably still a little ways off.

I still need to import the realm data in a way that will work for local dev. So does this function require the presence of the realm operator?

Thanks

The --import-realm cli option is not at all related to some operator stuff, this is natively supported by Keycloak itself. You can just power up a Keycloak container with e.g. start-dev --import-realm command and all realm JSON files in the /op/keycloak/data/import directory will be imported (if not already existing).

2 Likes

Awesome, thanks for the reply. I’ve got things working with --import realm and I’ll move forward with that