how to 'expose' openldap server deployed on openshift to be accessed ?

Latest response

I am able to deploy the docker image of the openldap server, the pod is up and running. Like other deployed app i defined a route to access the open ldap server. However, the when clicked on route defined, the page will not load.

Since defining route create a http/https url, which may not work for ldap server since ldap is being accessed via ldap://<ldap-server-address:389.

I also try connecting to it by taken out the http:// part of the url from the route and try to connect it via a ldap browser JXplorer and the connection will just timeout.

I cannot find any information on how to 'expose' this ldap server to be accessed.

Can someone point me to the steps to 'expose' openldap server in openshift please?


create a NodePort service that link to the ldap pod that is running and specify the selector to be as the pod, for example, create a openldap.yaml looks like below:

apiVersion: v1 kind: Service metadata: name: openldap-2441-centos7-1 labels: name: openldap-2441-centos7 spec: type: NodePort ports: - port: 389 nodePort: 30389 name: http selector: app: openldap-2441-centos7 deploymentconfig: openldap-2441-centos7

and then run: oc create -f openldap.yaml

then can access via ldap://:30389