Elasticsearch tries to take advantage of all the available resources by distributing data (index shards) among nodes in the cluster.
Users might want to influence this data distribution by configuring the index.routing.allocation.total_shards_per_node
index setting to a custom value (for e.g. 1
in case of a highly trafficked index).
Various configurations limiting how many shards an index can have located on one node
can lead to shards being unassigned due to the cluster not having enough nodes to
satisfy the index configuration.
In order to fix this follow the next steps: