Cross-cluster search with cluster behind LB

I’m curious is it possible to configure a cross-cluster search between 2 clusters if one of them is behind LB. I have 2 clusters that are deployed in different Kubernetes clusters, and there is no possibility to access pods from one cluster to another directly, only via ingress and LB.
so is it possible to configure cross-cluster search in this case?

Hi @andrii - I haven’t quite made myself an expert in this area just yet, but what comes to mind as a first thing to try is to make coordinator nodes be the ones that sit behind the load balancer. That way the queries would still make it to nodes that knew how to route them appropriately.

I’ll leave it to someone else to offer more specific insight than that – I’ll be curious myself.


You can setup a proxy which forwards to your cluster’s LB. Then the remote connection can be created using the proxy mode(not the default sniff mode which needs seed nodes).

curl -XPUT -k -H 'Content-Type: application/json' -u 'user:password' 'https://localhost:9200/_cluster/settings?pretty' -d '
  "persistent": {
    "cluster": {
      "remote": {
        "my-connection-alias": {
          "mode": "proxy",
          "proxy_address": "<proxy IP:proxy port>"

After configuring the remote cluster connection, you should be able to use cross-cluster search. But cross-cluster replication would probably not work. You can try it out and let us know.