# Did elasticsearch cluster name includes special characters

**URL:** <https://discuss.elastic.co/t/did-elasticsearch-cluster-name-includes-special-characters/248329>\
**Category:** Elasticsearch\
**Created:** [September 11, 2020, 1:18pm UTC](https://discuss.elastic.co/t/did-elasticsearch-cluster-name-includes-special-characters/248329 "2020-09-11T13:18:43Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![chandu2](https://avatars.discourse-cdn.com/v4/letter/c/ee7513/32.png) [@chandu2](https://discuss.elastic.co/u/chandu2)\
**Post date:** [September 11, 2020, 1:18pm UTC](https://discuss.elastic.co/t/did-elasticsearch-cluster-name-includes-special-characters/248329/1 "2020-09-11T13:18:43Z")

</div>

Did elasticsearch cluster name includes special characters. If Iam including I am getting error. Please anyone clarify on this. How can I use special characters also

---

<div class="post-metadata">

**Author:** ![Peter\_Steenbergen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/peter_steenbergen/32/22888_2.png) [@Peter\_Steenbergen](https://discuss.elastic.co/u/Peter_Steenbergen)\
**Post date:** [September 11, 2020, 1:39pm UTC](https://discuss.elastic.co/t/did-elasticsearch-cluster-name-includes-special-characters/248329/2 "2020-09-11T13:39:32Z")

</div>

I always thought that the cluster.name setting found on [https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster.name.html#cluster.name](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster.name.html#cluster.name)  
always must consist of alphanumeric characters and dash/underscore.

What characters are you trying to use?

---

<div class="post-metadata">

**Author:** ![chandu2](https://avatars.discourse-cdn.com/v4/letter/c/ee7513/32.png) [@chandu2](https://discuss.elastic.co/u/chandu2)\
**Post date:** [September 11, 2020, 1:56pm UTC](https://discuss.elastic.co/t/did-elasticsearch-cluster-name-includes-special-characters/248329/3 "2020-09-11T13:56:16Z")

</div>

I am using default\_elastic. I am getting error

---

<div class="post-metadata">

**Author:** ![Peter\_Steenbergen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/peter_steenbergen/32/22888_2.png) [@Peter\_Steenbergen](https://discuss.elastic.co/u/Peter_Steenbergen)\
**Post date:** [September 11, 2020, 1:58pm UTC](https://discuss.elastic.co/t/did-elasticsearch-cluster-name-includes-special-characters/248329/4 "2020-09-11T13:58:28Z")

</div>

Can you share the error?

---

<div class="post-metadata">

**Author:** ![chandu2](https://avatars.discourse-cdn.com/v4/letter/c/ee7513/32.png) [@chandu2](https://discuss.elastic.co/u/chandu2)\
**Post date:** [September 11, 2020, 2:08pm UTC](https://discuss.elastic.co/t/did-elasticsearch-cluster-name-includes-special-characters/248329/5 "2020-09-11T14:08:17Z")

</div>

Yes. Below is the error I am getting:  
The Elasticsearch "default\_elastic" is invalid: metadata.name: Invalid value: "default\_elastic": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. '[example.com](http://example.com)', regex used for validation is 'a-z0-9?(.a-z0-9?)\*')

---

<div class="post-metadata">

**Author:** ![Peter\_Steenbergen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/peter_steenbergen/32/22888_2.png) [@Peter\_Steenbergen](https://discuss.elastic.co/u/Peter_Steenbergen)\
**Post date:** [September 11, 2020, 2:53pm UTC](https://discuss.elastic.co/t/did-elasticsearch-cluster-name-includes-special-characters/248329/6 "2020-09-11T14:53:47Z")

</div>

Are you using it on kubernetes by any chance?  
It looks like that, and it is not an elastic thing but more a k8s thing.

For instance:

> <https://github.com/kubernetes/kubernetes/pull/39675/files>

You can use the characters a-z or "-" or a "." but no other characters.

---

<div class="post-metadata">

**Author:** ![chandu2](https://avatars.discourse-cdn.com/v4/letter/c/ee7513/32.png) [@chandu2](https://discuss.elastic.co/u/chandu2)\
**Post date:** [September 11, 2020, 3:17pm UTC](https://discuss.elastic.co/t/did-elasticsearch-cluster-name-includes-special-characters/248329/7 "2020-09-11T15:17:35Z")

</div>

Yes, I am using it in kubernetes. Thank you

---

<div class="post-metadata">

**Author:** ![Steve\_Mushero](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steve_mushero/32/22441_2.png) [@Steve\_Mushero](https://discuss.elastic.co/u/Steve_Mushero)\
**Post date:** [September 12, 2020, 4:06am UTC](https://discuss.elastic.co/t/did-elasticsearch-cluster-name-includes-special-characters/248329/8 "2020-09-12T04:06:52Z")

</div>

Looks like it is using the same name for the 'host' and node, and since they have to be DNS names, cannot use underscore. Just use dash. Annoying, I know.

---

<div class="post-metadata">

**Author:** ![chandu2](https://avatars.discourse-cdn.com/v4/letter/c/ee7513/32.png) [@chandu2](https://discuss.elastic.co/u/chandu2)\
**Post date:** [September 14, 2020, 10:03am UTC](https://discuss.elastic.co/t/did-elasticsearch-cluster-name-includes-special-characters/248329/9 "2020-09-14T10:03:56Z")

</div>

Is there any way to use underscores with Capital letters for cluster name. Thanks in advance

---

<div class="post-metadata">

**Author:** ![Peter\_Steenbergen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/peter_steenbergen/32/22888_2.png) [@Peter\_Steenbergen](https://discuss.elastic.co/u/Peter_Steenbergen)\
**Post date:** [September 14, 2020, 11:52am UTC](https://discuss.elastic.co/t/did-elasticsearch-cluster-name-includes-special-characters/248329/10 "2020-09-14T11:52:00Z")

</div>

No I do not think that it is possible, it has to follow the RFC guidelines.

---

<div class="post-metadata">

**Author:** ![chandu2](https://avatars.discourse-cdn.com/v4/letter/c/ee7513/32.png) [@chandu2](https://discuss.elastic.co/u/chandu2)\
**Post date:** [September 14, 2020, 12:50pm UTC](https://discuss.elastic.co/t/did-elasticsearch-cluster-name-includes-special-characters/248329/11 "2020-09-14T12:50:19Z")

</div>

okay. 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:** [October 12, 2020, 12:50pm UTC](https://discuss.elastic.co/t/did-elasticsearch-cluster-name-includes-special-characters/248329/12 "2020-10-12T12:50:24Z")

</div>

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