Skip to content

OpenLDAP and phpLDAPadmin with Kubernetes using Longhorn

License

Notifications You must be signed in to change notification settings

jpcweb/openldap-kubernetes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenLDAP and phpLDAPadmin using Kubernetes and Longhorn

Run a lightweight directory access protocol using openLDAP with Kubernetes.
Manage your PVC(s) with Longhorn.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

A K8s cluster with longhorn ready.

Installing

Create both env and secret files for your admin password.

# Create the env file
cat <<< 'LDAP_ORGANISATION="EXAMPLE"
LDAP_DOMAIN=example.com' > env
kubectl create configmap openldap --from-env-file=env

# Create the secret file
cat <<< 'LDAP_ADMIN_PASSWORD=DFSe34csPs54519x' > secret
kubectl create secret generic openldap --from-env-file=./secret

Then create the objects (pvc, deployment, service).

kubectl apply -f pvc.yml 
# ...

These objects are voluntarily separated into several files.
The service is a NodePort by the way.

Try it

You can create some ldif files and add them

# Suppose you have a users_ou.ldif in a ldifs folder
ldapadd -h Your_node_IP -p 31389 -D "cn=admin,dc=example,dc=com" \
-f ./ldifs/users_ou.ldif -W

# List everything
ldapsearch -h Your_node_IP -p 31389 -x -LLL -b dc=example,dc=com "*" \
-D "cn=admin,dc=example,dc=com" -W

Built With

Authors

  • Jeremie Payet - Initial work - JPCWeb

License

This project is licensed under the MIT License

Acknowledgments

About

OpenLDAP and phpLDAPadmin with Kubernetes using Longhorn

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published