# ECK - Kubernetes liveness and readiness probes

**URL:** <https://discuss.elastic.co/t/eck-kubernetes-liveness-and-readiness-probes/217663>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Created:** [February 3, 2020, 5:01pm UTC](https://discuss.elastic.co/t/eck-kubernetes-liveness-and-readiness-probes/217663 "2020-02-03T17:01:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JanKowalik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jankowalik/32/55905_2.png) [@JanKowalik](https://discuss.elastic.co/u/JanKowalik)\
**Post date:** [February 3, 2020, 5:01pm UTC](https://discuss.elastic.co/t/eck-kubernetes-liveness-and-readiness-probes/217663/1 "2020-02-03T17:01:10Z")

</div>

Is it recommended to provide custom `livenessProbe` and `readinessProbe` for services deployed using the ECK operator?  
I can see that the operator creates readiness probes by default. Is the default suitable for production environment? What about a liveness probe, should I define one? How do I do it?

---

<div class="post-metadata">

**Author:** ![charith-elastic](https://avatars.discourse-cdn.com/v4/letter/c/3ec8ea/32.png) [@charith-elastic](https://discuss.elastic.co/u/charith-elastic)\
**Post date:** [February 4, 2020, 8:16am UTC](https://discuss.elastic.co/t/eck-kubernetes-liveness-and-readiness-probes/217663/2 "2020-02-04T08:16:37Z")

</div>

For a stateful application such as Elasticsearch, it might not be prudent to let Kubernetes automatically restart unresponsive pods by defining a `livenessProbe`. It depends on your use case and risk tolerance. Indiscriminately restarting Elasticsearch nodes will have a negative impact on your cluster state and application performance depending on a variety of factors such as how you have configured Elasticsearch and how much data you have stored. Elasticsearch has its own clustering logic that can detect dead nodes and work around them so there's limited utility in using Kubernetes liveness probes in addition as well.

We are aware of several production deployments of ECK both internally and externally. The default readiness probe seems to work very well for those deployments. Again, it is up to you to decide what is suitable for your use case and change the default if necessary. Instructions on doing so can be found at [https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-readiness.html](https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-readiness.html).

---

<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:43am UTC](https://discuss.elastic.co/t/eck-kubernetes-liveness-and-readiness-probes/217663/3 "2022-11-04T07:43:18Z")

</div>


