Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Nodeport - connect to DB? #23

Closed
aroute opened this issue Feb 20, 2020 · 2 comments
Closed

Nodeport - connect to DB? #23

aroute opened this issue Feb 20, 2020 · 2 comments

Comments

@aroute
Copy link
Member

aroute commented Feb 20, 2020

How does one connect to the database via tools like DBVisualizer from outside of the cluster? I have deployed Db2 on OCP 3.11. I tried connecting using IP:NodePort, IP:50000. Created route, tried hostname:50000. None of the combination work. Anyone able to connect to the DB from outside of the cluster? How?

@adesilva74
Copy link

You need to use the NodePort associated with the service as well -- IE. you cannot use port 50000 from outside .. When connecting via NodePort IP, you can simply direct to the hostname/IP of the master node and it'll get routed accordingly.

Example from my OpenShift cluster,

[root@harihari-master-1 ~]# oc get svc | grep -i engn
db2wh-1582088279-db2u-engn-svc   NodePort    172.30.85.13     <none>        50000:31881/TCP,50001:31977/TCP                                                   1d

[root@harihari-master-1 ~]# oc describe svc db2wh-1582088279-db2u-engn-svc | grep -i nodeport
Type:                     NodePort
NodePort:                 legacy-server  31881/TCP
NodePort:                 ssl-server  31977/TCP

@cg8
Copy link
Collaborator

cg8 commented Mar 9, 2020

Thanks @adesilva74, could you please submit a PR against our DOC on how to

@aroute Please reopen if you feel we did not provide enough guidance.

@rayyaoibm Could you please submit a PR for our README that further details this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants