<p>I have created a Kubernetes cluster, and I wish to connect it to my Active Directory, using LDAP, so it'll behave as follows:</p>

<p>Anyone who want to run <code>kubectl</code>, will have to authenticate first (and that authentication shall be against my AD). Preferably, there will be single sign-on (SSO), meaning that the authentication should occur every once in a while (sessions).</p>

<p>However, I failed to find anything like that in the official Kubernetes docs, so I wanted to know what possible suggestions are there?</p>

<p>Firstly there is no simple way(yet) to achieve this. One way to is to achieve as below.</p>

<p>Part one is to install <a href="https://github.com/dexidp/dex" rel="nofollow noreferrer">DEX</a>.</p>

<p>Dex is an OpenID Connect provider done by CoreOS. Dex can defer authentication to LDAP servers.</p>

<p>The second part is to install and configure <a href="https://github.com/heptiolabs/gangway" rel="nofollow noreferrer">gangway</a></p>

<p>It is by Hepito it will talk with OIDC provider which is Dex and It has a UI to configure kubectl(via downloading kubeconfig)  </p>

<p>For SSO Joel Speed form Pusher wrote an awesome <a href="https://medium.com/@pmvk/step-by-step-guide-to-integrate-ldap-with-kubernetes-1f3fe1ec644e" rel="nofollow noreferrer">article</a> it also uses dex but UI is custom.     </p>

<p>Hope this help</p>
