# \[Ray Serve\] How to add readiness and liveness to ray serve

**URL:** <https://discuss.ray.io/t/ray-serve-how-to-add-readiness-and-liveness-to-ray-serve/10327>\
**Category:** Ray Serve\
**Created:** [April 20, 2023, 2:38am UTC](https://discuss.ray.io/t/ray-serve-how-to-add-readiness-and-liveness-to-ray-serve/10327 "2023-04-20T02:38:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lanmcc](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/lanmcc/32/3399_2.png) [@lanmcc](https://discuss.ray.io/u/lanmcc)\
**Post date:** [April 20, 2023, 2:38am UTC](https://discuss.ray.io/t/ray-serve-how-to-add-readiness-and-liveness-to-ray-serve/10327/1 "2023-04-20T02:38:40Z")

</div>

How to add readiness and liveness to the head and worker nodes of the ray serve cluster deployed by kuberay？

kuberay RayService

> **[RayService - KubeRay Docs](https://ray-project.github.io/kuberay/guidance/rayservice/)**

---

<div class="post-metadata">

**Author:** ![Kai-Hsun\_Chen](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/kai-hsun_chen/32/3760_2.png) [@Kai-Hsun\_Chen](https://discuss.ray.io/u/Kai-Hsun_Chen)\
**Post date:** [April 20, 2023, 8:44pm UTC](https://discuss.ray.io/t/ray-serve-how-to-add-readiness-and-liveness-to-ray-serve/10327/2 "2023-04-20T20:44:15Z")

</div>

Hi, you can define the probes in `template.spec.containers[0].readinessProbe`. `template` is a PodTemplate, so you can configure it as a Pod. See [here](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) for more details.

---

<div class="post-metadata">

**Author:** ![manickavela29](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/manickavela29/32/7966_2.png) [@manickavela29](https://discuss.ray.io/u/manickavela29)\
**Post date:** [May 16, 2025, 1:34pm UTC](https://discuss.ray.io/t/ray-serve-how-to-add-readiness-and-liveness-to-ray-serve/10327/3 "2025-05-16T13:34:22Z")

</div>

Hi @Kai-Hsun_Chen,

Can you give a good sample for testing liveness/readiness for ray workers.  
Given that they will be deploying multiple replica of application inside a worker node.  
What is the best practice to define our liveliness or readiness probe with ray serve worker nodes
