Connecting from Outside the cluster

OneDB Native SQLI connection are accessible through the OneDB Connection Manager. A kubernetes service will be created with the deployment and that service name is used for connections. The ambassador service is created for the non-SQLI connections. The ambassador service is setup as a Loadbalancer type where as the OneDB Connection Manager has a default setting of ClusterIP. To allow external SQLI connectivity you must set the service type to LoadBalancer.

kubectl get services
 
 NAME                  TYPE           CLUSTER-IP        EXTERNAL-IP           PORT(S)           AGE
sofy-1-ambassador     LoadBalancer   10.96.224.175    172.19.255.200        80:32653/TCP,44     68m    
sofy-1-odbp-mongo     ClusterIP      10.96.183.135    <none>                27017/TCP           69m        
sofy-1-odbp-rest      ClusterIP      10.96.173.88     <none>                8080/TCP            69m   
sofy-1-odbp-explore   ClusterIP      10.96.66.46      <none>                8080/TCP            71m        
onedbcm-cm-service    LoadBalancer   10.96.33.166     172.19.255.201        10000:30248/TCP     77m  

The OneDB Connection manager supports “Redirected” and “Proxied” connections. For external connections you must use the “Proxied” connections. The following table shows the external connection string to use for each driver type.

Driver URL Example URL
OneDB driver (SQLI-Primary) {LoadBalancer External IP address}:20000 jdbc:onedb://{url}/sysmaster
OneDB driver (SQLI-Secondary) {LoadBalancer External IP address}:20001 jdbc:onedb://{url}/sysmaster
OneDB driver (SQLI-Any) {LoadBalancer External IP address}:20002 jdbc:onedb://{url}/sysmaster
OneDB driver (SQLI-Primary-SSL) {LoadBalancer External IP address}:20020 jdbc:onedb://{url}/sysmaster
OneDB driver (SQLI-Secondary-SSL) {LoadBalancer External IP address}:20021 jdbc:onedb://{url}/sysmaster
OneDB driver (SQLI-Any-SSL) {LoadBalancer External IP address}:20022 jdbc:onedb://{url}/sysmaster
Mongo combatible driver {LoadBalancer External IP address}:27017 mongodb://{url}:27017
REST {LoadBalancer External IP address}:8080 http://{url}:8080
Explore {LoadBalancer External IP address}:8080 http://{url}:8080