# Cross-Cluster Search With Hostname/Path

**URL:** <https://discuss.elastic.co/t/cross-cluster-search-with-hostname-path/210597>\
**Category:** Elasticsearch\
**Created:** [December 4, 2019, 9:52pm UTC](https://discuss.elastic.co/t/cross-cluster-search-with-hostname-path/210597 "2019-12-04T21:52:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![immolation](https://avatars.discourse-cdn.com/v4/letter/i/dfb087/32.png) [@immolation](https://discuss.elastic.co/u/immolation)\
**Post date:** [December 4, 2019, 9:52pm UTC](https://discuss.elastic.co/t/cross-cluster-search-with-hostname-path/210597/1 "2019-12-04T21:52:11Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 1, 2020, 9:52pm UTC](https://discuss.elastic.co/t/cross-cluster-search-with-hostname-path/210597/2 "2020-01-01T21:52:12Z")

</div>

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