Update node roles with shards assigned

Cluster is having 6 nodes, having the default role: cdfhilmrstw

How to update the node.roles from all to master only.
Note: node has already a shards assigned, containing .security-7 index.

IF I run elasticsearch-node repurpose to delete data to be master eligible node, password for default elastic user was also getting deleted.

Goal is to update the nodes, with each specific roles e.g. 3 master, 2 data, and 1 ingest nodes.


You can add node.roles to $ES_HOME/config/elasticsearch.yml


  • node.roles: [master]

For all roles or some, you can do

  • node.roles: [master, data, data_hot, data_warm, data_cold, data_frozen, data_content, ingest, ml, remote_cluster_client, transform]

Reference to all role names, you can use this link

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