Keycloak helm chart integrate current groups, roles and clients

Hi All,

I am trying to deploy the keyclpoak helm chart via terraform and would like to ask if there is any documentation available on how to integrate the current groups, roles and clients into the default helm chart? I would like to have everything configured in advance.

Keycloak have an export and import mechanism. Configure it the way you need (realms, clients, users) , do an export an then use the import mechanism.

The way to do that will be different from helm chart to helm chart.

Thanks a lot for telling me that there is a import mechanism. I already know this.
I would like to know how to do that. Is there any example available with any of those many helm charts ?
Also it takes a lot of time to get any reply on this forum. What’s the purpose of even posting here if every member ignores questions from new users that would like to integrate this tool in production … ?
How can I know how to import an exported json structure if there is no information available and no example ?

I was able to find some documentation. For everyone that is struggling with the same issue, you cna have a look at the following object and helm template it to your needs.

Obviously the example does not work. The following errors pops up when trying to deploy copy/paste from the official Keycloak documentation mentioned above.

Error:

error: resource mapping not found for name: "keycloak" namespace: "default" from "keycloak/realms/keycloak_realm.yaml": no matches for kind "KeycloakRealmImport" in version "k8s.keycloak.org/v2alpha1"

It’s just ridiculous. Also manual import throws errors. So basically I use the UI to export everything, use the UI to import the just exported json file and it throws errors and refuses to import …

Did anyone test this before ? it’s just ridiculous how much time it takes to use basic functions of this product, export and import does not work from UI, import through the Kubernetes example does not work.

Am I the only one that is using this functionality ?

1 Like

Did you manage to get it working? I’m facing the same issue, trying to import a realm from K8S configuration, like this: Advanced configuration - Keycloak but I’m getting this error when applying:

error: resource mapping not found for name: "keycloak" namespace: "default" from "keycloak/realms/keycloak_realm.yaml": no matches for kind "KeycloakRealmImport" in version "k8s.keycloak.org/v2alpha1"
1 Like

This might sound like a stupid question, but are you running the latest version of the Keycloak Operator? The online guide is for the latest version (there were breaking changes).