# How to recover cluster state red in K8s

**URL:** <https://discuss.elastic.co/t/how-to-recover-cluster-state-red-in-k8s/272420>\
**Category:** Elasticsearch\
**Created:** [May 7, 2021, 1:00pm UTC](https://discuss.elastic.co/t/how-to-recover-cluster-state-red-in-k8s/272420 "2021-05-07T13:00:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dandelion](https://avatars.discourse-cdn.com/v4/letter/d/f475e1/32.png) [@dandelion](https://discuss.elastic.co/u/dandelion)\
**Post date:** [May 7, 2021, 1:00pm UTC](https://discuss.elastic.co/t/how-to-recover-cluster-state-red-in-k8s/272420/1 "2021-05-07T13:00:47Z")

</div>

We are using Elasticsearch along with Graylog. We have three replicas running.  
On the Graylog side I noticed that the Elasticsearch cluster status is red. Started to investigate, and noticed that we had run out of disk space. Allocated more space. And tried to restart the pods in Kubernetes, but the Elasticsearch wont start, as according the logs the cluster health is still red.

I can clarify this inside the pod, by checking the cluster health:

> curl -X GET "localhost:9200/\_cluster/health?pretty"  
> {  
> "cluster\_name" : "elasticsearch",  
> "status" : "red",  
> "timed\_out" : false,  
> "number\_of\_nodes" : 3,  
> "number\_of\_data\_nodes" : 3,  
> "active\_primary\_shards" : 120,  
> "active\_shards" : 120,  
> "relocating\_shards" : 0,  
> "initializing\_shards" : 0,  
> "unassigned\_shards" : 2,  
> "delayed\_unassigned\_shards" : 0,  
> "number\_of\_pending\_tasks" : 0,  
> "number\_of\_in\_flight\_fetch" : 0,  
> "task\_max\_waiting\_in\_queue\_millis" : 0,  
> "active\_shards\_percent\_as\_number" : 98.36065573770492  
> }

How to recover the cluster state to green?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 12, 2021, 12:45am UTC](https://discuss.elastic.co/t/how-to-recover-cluster-state-red-in-k8s/272420/2 "2021-05-12T00:45:44Z")

</div>

Welcome to our community! 😃

What's the output from the `_cat/allocation?v` and `_cat/indices?v` endpoints?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 9, 2021, 12:45am UTC](https://discuss.elastic.co/t/how-to-recover-cluster-state-red-in-k8s/272420/3 "2021-06-09T00:45:54Z")

</div>

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