# Keycloak helm chart integrate current groups, roles and clients

**URL:** <https://forum.keycloak.org/t/keycloak-helm-chart-integrate-current-groups-roles-and-clients/16859>\
**Category:** Configuring the server\
**Created:** [August 11, 2022, 12:45pm UTC](https://forum.keycloak.org/t/keycloak-helm-chart-integrate-current-groups-roles-and-clients/16859 "2022-08-11T12:45:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rzvn2600](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/rzvn2600/32/6332_2.png) [@rzvn2600](https://forum.keycloak.org/u/rzvn2600)\
**Post date:** [August 11, 2022, 12:45pm UTC](https://forum.keycloak.org/t/keycloak-helm-chart-integrate-current-groups-roles-and-clients/16859/1 "2022-08-11T12:45:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![weltonrodrigo](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/weltonrodrigo/32/3104_2.png) [@weltonrodrigo](https://forum.keycloak.org/u/weltonrodrigo)\
**Post date:** [August 11, 2022, 8:51pm UTC](https://forum.keycloak.org/t/keycloak-helm-chart-integrate-current-groups-roles-and-clients/16859/2 "2022-08-11T20:51:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rzvn2600](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/rzvn2600/32/6332_2.png) [@rzvn2600](https://forum.keycloak.org/u/rzvn2600)\
**Post date:** [August 15, 2022, 11:44am UTC](https://forum.keycloak.org/t/keycloak-helm-chart-integrate-current-groups-roles-and-clients/16859/3 "2022-08-15T11:44:50Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![rzvn2600](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/rzvn2600/32/6332_2.png) [@rzvn2600](https://forum.keycloak.org/u/rzvn2600)\
**Post date:** [August 15, 2022, 12:42pm UTC](https://forum.keycloak.org/t/keycloak-helm-chart-integrate-current-groups-roles-and-clients/16859/4 "2022-08-15T12:42:06Z")

</div>

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.

- [Keycloak Realm Import - Keycloak](https://www.keycloak.org/operator/realm-import.html)

---

<div class="post-metadata">

**Author:** ![rzvn2600](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/rzvn2600/32/6332_2.png) [@rzvn2600](https://forum.keycloak.org/u/rzvn2600)\
**Post date:** [August 15, 2022, 1:18pm UTC](https://forum.keycloak.org/t/keycloak-helm-chart-integrate-current-groups-roles-and-clients/16859/5 "2022-08-15T13:18:17Z")

</div>

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:

```auto
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 ?

---

<div class="post-metadata">

**Author:** ![heruan](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/heruan/32/6471_2.png) [@heruan](https://forum.keycloak.org/u/heruan)\
**Post date:** [August 31, 2022, 12:00pm UTC](https://forum.keycloak.org/t/keycloak-helm-chart-integrate-current-groups-roles-and-clients/16859/6 "2022-08-31T12:00:52Z")

</div>

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](https://www.keycloak.org/operator/advanced-configuration) but I’m getting this error when applying:

```auto
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"

```

---

<div class="post-metadata">

**Author:** ![weltonrodrigo](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/weltonrodrigo/32/3104_2.png) [@weltonrodrigo](https://forum.keycloak.org/u/weltonrodrigo)\
**Post date:** [September 2, 2022, 1:33pm UTC](https://forum.keycloak.org/t/keycloak-helm-chart-integrate-current-groups-roles-and-clients/16859/7 "2022-09-02T13:33:35Z")

</div>

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).
