# Set role for cluster-member node

**URL:** <https://discuss.elastic.co/t/set-role-for-cluster-member-node/317785>\
**Category:** Elasticsearch\
**Created:** [October 31, 2022, 7:53am UTC](https://discuss.elastic.co/t/set-role-for-cluster-member-node/317785 "2022-10-31T07:53:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![g.le](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/g.le/32/22526_2.png) [@g.le](https://discuss.elastic.co/u/g.le)\
**Post date:** [October 31, 2022, 7:53am UTC](https://discuss.elastic.co/t/set-role-for-cluster-member-node/317785/1 "2022-10-31T07:53:30Z")

</div>

We 've been using ELK v7.10 in a cluster setup with several nodes.  
For the time being, all nodes have the same roles.

According to the [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/7.10/modules-node.html#node-roles), we could specify that a given node (member of the cluster) can have the `data_cold` role.

Is there an API we could invoke in order to set that role once the node becomes part of the cluster?  
Is there a specific flag we should have used while adding the node in the cluster?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [October 31, 2022, 7:56am UTC](https://discuss.elastic.co/t/set-role-for-cluster-member-node/317785/2 "2022-10-31T07:56:33Z")

</div>

That is set in the Elasticsearch config file.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 31, 2022, 8:01am UTC](https://discuss.elastic.co/t/set-role-for-cluster-member-node/317785/3 "2022-10-31T08:01:26Z")

</div>

Please note that 7.10 is [EOL](https://www.elastic.co/support/eol), you should upgrade as a matter of urgency.

---

<div class="post-metadata">

**Author:** ![g.le](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/g.le/32/22526_2.png) [@g.le](https://discuss.elastic.co/u/g.le)\
**Post date:** [October 31, 2022, 8:50am UTC](https://discuss.elastic.co/t/set-role-for-cluster-member-node/317785/4 "2022-10-31T08:50:43Z")

</div>

Thank you @Christian_Dahlqvist !  
So, all it takes is setting `node.roles: [data_cold]` via the relevant `elasticsearch.yml` config file.

@warkolm useful link! We 'll make sure we frequently track the EOL versions.

---

<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:** [November 28, 2022, 8:50am UTC](https://discuss.elastic.co/t/set-role-for-cluster-member-node/317785/5 "2022-11-28T08:50:58Z")

</div>

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