How to change cluster status is RED to YELLOW or GREEN

i am regularly facing this situation like clusterstatus is red
How to stop it becoming status RED !
please provide me relevant solution

It's hard to answer this question w/o further insight to your overall architecture, deployment structure, usage of Elasticsearch.

As a getting started I'd recommend you read up on

to understand better what each cluster status level means. To quote from the above:

At least one primary shard (and all of its replicas) is missing. This means that you are missing data: searches will return partial results, and indexing into that shard will return an exception.

One instance of where this happens would be one node hosting a primary shard of your index being down.

Hope this helps,
Isabel

Thank you very much @mainec