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@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@dspace.de<mailto:mgeorge@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>.