Single node cluster and cluster status


I have a similar question to this post.

I am running a single node cluster for development and I do not want indexes to be trying to allocate replicas. I have templates for my indexes, but the watcher history indexes allocate replica nodes. When I try to set the "index.number_of_replicas" setting in elasticsearch.yml, it is an invalid property.

The goal here is to keep my cluster status green. Is there another way to achieve this?


Yes, you should use index templates for this, where you can do:

PUT /_template/my_template
{ "index_patterns": ["*"], "settings": { "number_of_replicas": 0 } }

So that all newly created indices automatically have 0 replicas.

ah, that works. thanks!

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