Cross-Cluster Search With Hostname/Path

Hello! I have Elasticsearch running in Kubernetes, and there is a cluster in each AWS Availability Zone (AZ). I am working on setting up cross-cluster searching across all AZs and currently have it working, but not in a desirable/future-proof way.

In each K8s cluster, I set up a NodePort for Elasticsearch, and then my elasticsearch.yml looks something like this (elasticsearch.yml in AZ A hitting AZ B):

---
cluster.name: "docker-cluster"
network.host: 0.0.0.0
discovery.zen.minimum_master_nodes: 1
search:
    remote:
        cluster_a:
            seeds: "127.0.0.1:9300"
        cluster_b:
            seeds: "<IP of worker node in AZ B>:<NodePort>"

The problem with this is the NodePort will change in the event of a redeployment, and the node IP will change if a new cluster is deployed. I have an ingress and Application Load Balancer (ALB) for all applications and would like to know if it was possible to either use the ingress and specify a path (as other apps are using the ingress) or - ideally - to use the hostname used by the ALB and the path. Hostname doesn't seem to be a problem, but adding a path doesn't seem to work. If that doesn't work, is there a better recommended method for achieving this?

Thank you!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.