[keycloak-user] Create users in the imported real using helm

Mathew George mgeorge at dspace.de
Mon Jul 22 02:40:10 EDT 2019


Hello,

I am using keycloak helm charts for installing keycloak in our cluster and I am able to import a custom realm as described in the documentation. Now I want to create some users in this custom realm. I tried using the 'prestartScript'.  See the contents of my value.yaml


  extraVolumes: |
    - name: realm-secret
      secret:
        secretName: realm-secret

  extraVolumeMounts: |
    - name: realm-secret
      mountPath: "/realm/"
      readOnly: true

  extraArgs: -Dkeycloak.import=/realm/realmData.json

  preStartScript: |
    /opt/jboss/keycloak/bin/kcadm.sh create users -r MyCustomRealm -s username=admin -s enabled=true;/opt/jboss/keycloak/bin/kcadm.sh set-password -r MyCustomRealm --username admin --new-password admin;
  enabled: false



But this is not working. I also tried the following command in the 'preStartScript'. ( This is also not working)

/opt/jboss/keycloak/bin/add-user-keycloak.sh -r MyCustomRealm -u admin -p admin


Kindly provide inputs.


Best regards

[cid:image001.png at 01D54069.121BC050]

Mathew George
Experiment Software ECTA

dSPACE GmbH
Rathenaustraße 26
33102 Paderborn

Tel.: +49 5251 1638-507
Fax: +49 5251 16198-0
Mail: mgeorge at dspace.de<mailto:mgeorge at dspace.de>
Web: www.dspace.com<http://www.dspace.com>


We comply with our obligation to inform you about data protection according to Art. 13-14 of the GDPR by publishing said information on our website. Read our data protection regulations here<https://www.dspace.com/en/pub/home/privacypolicy.cfm>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 3439 bytes
Desc: image001.png
Url : http://lists.jboss.org/pipermail/keycloak-user/attachments/20190722/b929233a/attachment-0001.png 


More information about the keycloak-user mailing list