Creating groups with Keycloak Operator

Hi there. Is it possible to create Groups when setting up realms with Keycloak Operator. There is no specific CRD for Groups, and I see users can have a list of groups they belong to, but can’t find the way to create configure the groups.

Any help or pointers will be highly appreciated! Thanks.

1 Like

Also looking for this, did you have any luck?

Nope, I didn’t get any answers :frowning:
At the time we ended up not using groups.

Damn, i also need this, out of curiosity, what was your work around for this issue?

I found this

It made me sad.

Been busy with taking a manually configured keycloak and replicating the settings using CR’s, its been two weeks and its taxing, figuring out the CRDs. There has to be something better than this pattern.

I really wonder why they went his route when keycloak has an export functionality and an import backed by an api. Granted it is Json, but if you polled the export, did a matches on the object then pushed to the import on a mismatch you’d reconcile the settings and have full support on 2 API calls.

I know GoLang doesnt work well with Json but I would think it would be easier for keycloak to support a yaml export and import. Idk even a plugin that exports to a CR would speed things up. This is super painful.

I probably over simplified things and I have limited knowledge of Golang, operators and keycloak. Anyways best of luck to future readers.

Edit: Looks like the plan is to move to a Java operator

https://groups.google.com/g/keycloak-dev/c/mUuEDvL59OE/m/xsHhhIvkAQAJ