asp.net-corekuberneteskubernetes-health-check

What is benefit of readiness probe and healthCheck?


I am working on an application that, as I can see is doing multiple health checks?

  1. DB readiness probe
  2. Another API dependency readiness probe

When I look at cluster logs, I realize that my service, when it fails a DB-check, just throws 500 and goes down. What I am failing to understand here is that if DB was down or another API was down and IF I do not have a readiness probe then my container is going down anyway. Also, I will see that my application did throw some 500 because DB or another service was off.

What is the benefit of the readiness probe of my container was going down anyway? Another question I have is that is Healthcheck something that I should consider only if I am deploying my service to a cluster? If it was not a cluster microservice environment, would it increase/decrease benefits of performing healtheck?


Solution

  • There are three types of probes that Kubernetes uses to check the health of a Pod:

    https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/