# Unable to set hostalias in opensearchcluster

**URL:** <https://forum.opensearch.org/t/unable-to-set-hostalias-in-opensearchcluster/22985>\
**Category:** OpenSearch\
**Created:** [January 3, 2025, 3:03pm UTC](https://forum.opensearch.org/t/unable-to-set-hostalias-in-opensearchcluster/22985 "2025-01-03T15:03:19Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![rmssath](https://avatars.discourse-cdn.com/v4/letter/r/858c86/32.png) [@rmssath](https://forum.opensearch.org/u/rmssath)\
**Post date:** [January 3, 2025, 3:03pm UTC](https://forum.opensearch.org/t/unable-to-set-hostalias-in-opensearchcluster/22985/1 "2025-01-03T15:03:19Z")

</div>

**Versions** (relevant - OpenSearch/Dashboard/Server OS/Browser):  
Environment: kubernetes  
opensearch operator - 2.7.0  
opensearch & dashboard version - 2.17.0

**Describe the issue** :  
Am trying to set the hostalias in opensearch nodes. But, unable to set hostalias in kind: opensearchcluster.

**Configuration** :

**Relevant Logs or Screenshots** :

---

<div class="post-metadata">

**Author:** ![pablo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/pablo/32/10363_2.png) [@pablo](https://forum.opensearch.org/u/pablo)\
**Post date:** [January 22, 2025, 12:13am UTC](https://forum.opensearch.org/t/unable-to-set-hostalias-in-opensearchcluster/22985/2 "2025-01-22T00:13:09Z")

</div>

@rmssath Why would need to set hostnames in the pods? Are your referring to pod name or OS level pod hostname?

---

<div class="post-metadata">

**Author:** ![rmssath](https://avatars.discourse-cdn.com/v4/letter/r/858c86/32.png) [@rmssath](https://forum.opensearch.org/u/rmssath)\
**Post date:** [January 29, 2025, 1:42pm UTC](https://forum.opensearch.org/t/unable-to-set-hostalias-in-opensearchcluster/22985/3 "2025-01-29T13:42:56Z")

</div>

Hi @pablo,

To configure the snapshot repository with s3, we have deployed minio in our environment which is accessible only through host entry.

so we need to add hostalias in the opensearch CR

---

<div class="post-metadata">

**Author:** ![pablo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/pablo/32/10363_2.png) [@pablo](https://forum.opensearch.org/u/pablo)\
**Post date:** [February 5, 2025, 8:05am UTC](https://forum.opensearch.org/t/unable-to-set-hostalias-in-opensearchcluster/22985/4 "2025-02-05T08:05:57Z")

</div>

@rmssath I’ve tested `minio` with helm charts and OpenSearch Operator.  
In both cases I didn’t need any extra host entries to resolve my `minio` hostname as were resolved by my external DNS server.

---

<div class="post-metadata">

**Author:** ![pablo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/pablo/32/10363_2.png) [@pablo](https://forum.opensearch.org/u/pablo)\
**Post date:** [February 5, 2025, 8:06am UTC](https://forum.opensearch.org/t/unable-to-set-hostalias-in-opensearchcluster/22985/5 "2025-02-05T08:06:41Z")

</div>

@rmssath Could you share your OpenSearch s3 configuration?

---

<div class="post-metadata">

**Author:** ![rmssath](https://avatars.discourse-cdn.com/v4/letter/r/858c86/32.png) [@rmssath](https://forum.opensearch.org/u/rmssath)\
**Post date:** [March 14, 2025, 11:14am UTC](https://forum.opensearch.org/t/unable-to-set-hostalias-in-opensearchcluster/22985/6 "2025-03-14T11:14:48Z")

</div>

@pablo ,

We are running the below command inside the pod to create s3 repo in opensearch.

curl -u “admin:xxxxxx” -XPUT -k ‘[https://test-cluster:9200/\_snapshot/backup-s3-repository?verify=true&pretty](https://test-cluster:9200/_snapshot/backup-s3-repository?verify=true&pretty)’ -H ‘Content-Type: application/json’ -d’{“type”: “s3”,“settings”: {“endpoint”: “[https://minio.test.com](https://minio.test.com)”, “bucket”: “test-cluster”, “region”: “us-east-1”, “access\_key”: “xxxxxx”, “secret\_key”: “xxxxxxxx”, “base\_path”: “test-opensearch”, “path\_style\_access”: true }}’

Above [minio.test.com](http://minio.test.com) is not accessible over the internet. It is deployed internally with different subnet.

So we cannot access this [minio.test.com](http://minio.test.com) directly from opensearch pods. It requires host entry.

---

<div class="post-metadata">

**Author:** ![pablo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/pablo/32/10363_2.png) [@pablo](https://forum.opensearch.org/u/pablo)\
**Post date:** [March 24, 2025, 9:21am UTC](https://forum.opensearch.org/t/unable-to-set-hostalias-in-opensearchcluster/22985/7 "2025-03-24T09:21:20Z")

</div>

@rmssath My OpenSearch node are running on the local k8s and can access my internal minio node. It’s on the same network but that shouldn’t be an issue as my names are resolved through DNS server.  
My pods are using k8s host’s DNS configuration successfully.

---

<div class="post-metadata">

**Author:** ![rmssath](https://avatars.discourse-cdn.com/v4/letter/r/858c86/32.png) [@rmssath](https://forum.opensearch.org/u/rmssath)\
**Post date:** [April 29, 2025, 6:55am UTC](https://forum.opensearch.org/t/unable-to-set-hostalias-in-opensearchcluster/22985/8 "2025-04-29T06:55:42Z")

</div>

If it is different network, then we need option to add the hostalias
