# Horizontal and vertical upgrade of eck cluster

**URL:** <https://discuss.elastic.co/t/horizontal-and-vertical-upgrade-of-eck-cluster/210309>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Created:** [December 3, 2019, 8:49am UTC](https://discuss.elastic.co/t/horizontal-and-vertical-upgrade-of-eck-cluster/210309 "2019-12-03T08:49:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dineshabbi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dineshabbi/32/56301_2.png) [@dineshabbi](https://discuss.elastic.co/u/dineshabbi)\
**Post date:** [December 3, 2019, 8:49am UTC](https://discuss.elastic.co/t/horizontal-and-vertical-upgrade-of-eck-cluster/210309/1 "2019-12-03T08:49:43Z")

</div>

As per the documentation, I tried doing upgrades of the cluster using some of the examples given in [https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-orchestration.html](https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-orchestration.html)

a) Horizontal upgrade: I see a new service getting created with every statefulset creation, but under the hood they all belong to one cluster and is accessible via http service 9200 right ? How can I confirm that the shards are being rebalanced after horizontal upgrade ?

❯ kubectl get svc -n elastic-system ✹ ✭  
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE  
elasticsearch-exporter ClusterIP 172.20.72.204 9108/TCP 6d1h  
elasticsearch-sample-es-data-nodes ClusterIP None 5d20h  
elasticsearch-sample-es-data-nodes-2 ClusterIP None 41h  
elasticsearch-sample-es-http ClusterIP 172.20.133.254 9200/TCP 5d20h  
kibana-sample-kb-http ClusterIP 172.20.94.101 5601/TCP 5d20h

b) Vertical upgrade I tried, but I did specify a wrong RAM size while specifying, and the cluster got into a state where it could not recover/add any new pods after that. I am using 1.0 beta version, and I wonder vertical upgrade is fully supported in this release.

create Pod elasticsearch-sample-es-data-nodes-2-0 in StatefulSet elasticsearch-sample-es-data-nodes-2 failed error: Pod "elasticsearch-sample-es-data-nodes-2-0" is invalid: spec.containers[0].resources.requests: Invalid value: "3Gi": must be less than or equal to memory limit

---

<div class="post-metadata">

**Author:** ![sebgl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sebgl/32/48702_2.png) [@sebgl](https://discuss.elastic.co/u/sebgl)\
**Post date:** [December 3, 2019, 9:08am UTC](https://discuss.elastic.co/t/horizontal-and-vertical-upgrade-of-eck-cluster/210309/2 "2019-12-03T09:08:58Z")

</div>

> I see a new service getting created with every statefulset creation, but under the hood they all belong to one cluster and is accessible via http service 9200 right ?

Yes. You can ignore the per-StatefulSet service.

> How can I confirm that the shards are being rebalanced after horizontal upgrade ?

ECK does not do anything special here. We rely on Elasticsearch to rebalance shards automatically.

> Vertical upgrade I tried, but I did specify a wrong RAM size while specifying, and the cluster got into a state where it could not recover

You should normally be able to recover by modifying the Elasticsearch yaml manifest again with a correct RAM size. Note you need to set the proper [JVM heap size corresponding to the requested memory](https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-managing-compute-resources.html#k8s-compute-resources-elasticsearch).

---

<div class="post-metadata">

**Author:** ![dineshabbi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dineshabbi/32/56301_2.png) [@dineshabbi](https://discuss.elastic.co/u/dineshabbi)\
**Post date:** [January 31, 2020, 3:46am UTC](https://discuss.elastic.co/t/horizontal-and-vertical-upgrade-of-eck-cluster/210309/3 "2020-01-31T03:46:09Z")

</div>

Sorry for delayed reply, thank you so much @sebgl, just editing the elasticsearch object didn't have any issue with vertical scaling. I will figure out a way to update via yaml. Congrats on the GA anouncement for eck 1.0 !

---

<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:** [November 4, 2022, 7:35am UTC](https://discuss.elastic.co/t/horizontal-and-vertical-upgrade-of-eck-cluster/210309/4 "2022-11-04T07:35:50Z")

</div>


