Connectivity to Couchbase on ecs

I am struggling to connect my couchbase server from my local java. What connection string should I use? Should it be couchbase:// where route-DNS is the as couchbase web console?
And if I want to connect to couchbase server in the same cluster same namespace, what connection String should I use?

Have you referred to the docs?

https://docs.couchbase.com/operator/current/howto-client-sdks.html

Hi @matain,

Connecting from an external network might be a bit complicated, since it requires port forwarding and configuring Couchbase to advertise alternate addresses. Here’s a blog post that might help:

Yeah, now I can connect to the server from the same namespace by referring to the document. But still I cannot connect outside openshift. Do I need some extra configuration?

Hi, David,
Thanks a lot for your reply.
So creating a route(the route that I use to access couchbase console) in openshift will not help me connect from external network, do I get it correct?
And what about connecting with external Dns? Can I configure the spec.networking.dns.domain and use the external DNS way?

Hi @david.nault,
I referred to Configure Client SDKs | Couchbase Docs,
could you please explain are you referring to IP Based Addressing or External DNS method in the document?

Hi @matain ,

Sorry, I don’t know enough to answer these questions. All I know is the general principle: If the client and server are on not on the same network, Couchbase Server must be configured so the [alternate] addresses it advertises are accessible by the client.

Thanks,
David