Member-only story
How to resolve Elasticsearch cluster RED status
Lot of times the application or service relaying on Elasticsearch will fail to return the result for no reasons. When examined closely, the reason would be a bad state Elasticsearch cluster. In Elasticsearch, every node has roles. There are three main roles in every Elasticsearch cluster namely master, data and ingest. Having a dedicated master nodes will make the actions lightweight cluster-wide. With that roles, the Elasticsearch cluster can be deployed with different topologies. Like nodes for data & ingest and dedicated master nodes which also handles traffic or other famous topology is dedicated master, data nodes with dedicated client nodes for handling the traffic etc.
The re-indexing is necessary whenever any node is lost and coming back up online. This is very common in the case of kubernetes containers. The index’s will be in yellow color during the course of the recovery. The list of indices can be viewed at the endpoint https://<es-cluster-url>:9200/_cat/indices?v. This will list the indices that are undergoing the recovery or being re-indexed. At this point in time, the health of the index will also be in yellow state indicating that the cluster is performing some re-indexing operations, that can be verified at endpoint https://<es-cluster-url>:9200/_cat/health?v.