Title: Two+ node elasticsearch cluster - mirroring?
Tags: elasticsearch
Question: We wish to place an elasticsearch cluster on top of a kubernetes cluster (currently with 2 nodes, but we have plans to increase this).

Is it possible to configure elasticsearch in such a way that every node in the cluster contains identical data? so that if a node is lost then the remaining nodes in the cluster can continue to function?


Here is the accepted answer: Yes, you need to set the number of replicas equal to the number of nodes minus one.

Comment for this answer: This is the command ```curl -XPUT "localhost:9200//_settings?pretty" -H 'Content-Type: application/json' -d' { "number_of_replicas": 1 }'```
Comment for this answer: thanks for the information. We set the ES option "index.number_of_replicas:" in our config file.  To update the existing running indices we used a curl XPUT command as described [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-update-settings.html#indices-update-settings)


{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2015:00:09/18/15', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<elasticsearch>', 'Title': 'Two+ node elasticsearch cluster - mirroring?', 'ViewCount': 584, 'id': 32657317, 'user_AboutMe': '', 'user_AccountId': 6850751.0, 'user_DisplayName': 'DrGecko', 'user_Reputation': 553.0, 'user_Views': 26.0, 'user_id': 5347451.0}}