<p>Installed OpenLDAP by helm</p>

<pre><code>helm install openldap stable/openldap
</code></pre>

<p>Check data in the initialized server</p>

<pre><code>kubectl port-forward $OPENLDAP_POD_NAME 3890:389
ldapsearch -x -H ldap://localhost:3890 -b dc=example,dc=org -D "cn=admin,dc=example,dc=org" -w $LDAP_ADMIN_PASSWORD

# extended LDIF
#
# LDAPv3
# base &lt;dc=example,dc=org&gt; with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#

# example.org
dn: dc=example,dc=org
objectClass: top
objectClass: dcObject
objectClass: organization
o: Example Inc.
dc: example

# admin, example.org
dn: cn=admin,dc=example,dc=org
objectClass: simpleSecurityObject
objectClass: organizationalRole
cn: admin
description: LDAP administrator
userPassword:: [HIDDEN]

# search result
search: 2
result: 0 Success

# numResponses: 3
# numEntries: 2
</code></pre>

<p>Install keycloak</p>

<pre><code>helm install keycloak codecentric/keycloak
kubectl port-forward $KEYCLOAK_POD_NAME 8080
</code></pre>

<p>Bind it to Keycloak in the <code>User Federation</code> -> <code>Add user storage provider</code> -> <code>ldap</code> as below.</p>

<p><a href="https://i.stack.imgur.com/LwEGh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LwEGh.png" alt="enter image description here"></a></p>

<p>Why can't connect to ldap server? I login to the ldap pod to see the log but didn't find where is it.</p>

rawmain
<p>The &quot;Connection URL&quot; should most probably be <code>ldap://openldap.default:389</code> (and if <code>openldap</code> was deployed in a different namespace, replace <code>default</code> with that).</p>
