# ECK 2.6.1 node shutdown for invoice optimization

**URL:** <https://discuss.elastic.co/t/eck-2-6-1-node-shutdown-for-invoice-optimization/325374>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [February 13, 2023, 10:49am UTC](https://discuss.elastic.co/t/eck-2-6-1-node-shutdown-for-invoice-optimization/325374 "2023-02-13T10:49:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![screwyy](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@screwyy](https://discuss.elastic.co/u/screwyy)\
**Post date:** [February 13, 2023, 10:49am UTC](https://discuss.elastic.co/t/eck-2-6-1-node-shutdown-for-invoice-optimization/325374/1 "2023-02-13T10:49:28Z")

</div>

Hello,

I'm running an ECK 2.6.1 elastic cluster in a non-prod k8s cluster which has a Horizontal Node Autoscale rule based on CPU+RAM metrics.  
Is it possible to shutdown elastic nodes on Friday night and start them back up on Monday morning ? By doing so the autoscaler kicks in and downsize the k8s cluster and thus the invoice for the resources which elastic eats up will be lower ?

Why I don't want to spin up another weekly cluster is the fact that I lose data gathered previously. With VMs this is simple to achieve.

---

<div class="post-metadata">

**Author:** ![BenB196](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/benb196/32/83401_2.png) [@BenB196](https://discuss.elastic.co/u/BenB196)\
**Post date:** [February 13, 2023, 12:33pm UTC](https://discuss.elastic.co/t/eck-2-6-1-node-shutdown-for-invoice-optimization/325374/2 "2023-02-13T12:33:43Z")

</div>

I'm not sure if this is the best way to achieve your goal, but in theory, you could create 2 Kubernetes [cronjobs](https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/), one that runs on Friday nights, and one on Monday mornings. Each job could run something like `kubectl patch` or `kustomize` to update the `ElasticsearchAutoscaler` resource to meet your desired scales for weekends.

---

<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:** [March 13, 2023, 12:34pm UTC](https://discuss.elastic.co/t/eck-2-6-1-node-shutdown-for-invoice-optimization/325374/3 "2023-03-13T12:34:43Z")

</div>

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