0

On an Elasticsearch n-node cluster, how can you flag a node so not to have shards allocated on that node (for instance when you're putting the node into maintenance)?

I've looked on the documentation but could not find a clear answer.

dr_
  • 2,400
  • 1
  • 25
  • 39
  • 1
    Looks like this question was already answered: https://stackoverflow.com/questions/17268495/how-to-remove-node-from-elasticsearch-cluster-on-runtime-without-down-time – Nikolay Vasiliev Oct 18 '18 at 13:39
  • Thanks, posting an answer anyway as it could be useful for future users. – dr_ Oct 18 '18 at 13:47

1 Answers1

0

This can be done via this command (e.g. for a cluster node with IP 10.0.0.1):

PUT _cluster/settings
{
  "transient" : {
    "cluster.routing.allocation.exclude._ip" : "10.0.0.1"
  }
}

Source.

dr_
  • 2,400
  • 1
  • 25
  • 39