Is it possible to setup the probes for both Application and DB health checks simultaneously?

Is it possible to setup the readiness and liveness probes for both Application and DB health checks simultaneously?

I tried application health check by using https probe and DB check by using tcp probe(DB port), but it is not working.

Any inputs on this? Pls let me know. Thanks

Did you bundle your app and DB into a single container? You can configure a one liveness, readiness and startup probe per container in your pod, but each container in your pod CAN have their own liveness, readiness, startup probes.

Thanks for the inputs! Yep, both are in single container.

We have already setup the app health check probe and just need to add another probe for checking the DB health. Is there anyway where we can accomplish this along with app health check probes?

First, I would suggest running on app per container, with possibly multiple containers per pod. Many interfaces (like probes) are one per container.

If that is not possible, then you have to run a mux inside your container - e.g. Nginx which answers one URL by proxying your app and DB healthchecks, and returning the logical AND.

Failing either one will restart both - is that really what you war?

+1 to thockins suggestions of one app per container or pod.

Do you envision scaling the services separately? like your db would make sense for a StatefulSet whereas your app might be better served by a Deployment with more rollout and scaling primitives?