How should I healthcheck an event-driven service How should I healthcheck an event-driven service kubernetes kubernetes

How should I healthcheck an event-driven service


Having the service listen to HTTP solely to expose a liveness/readiness check (although in services that pull input from a message broker, readiness isn't necessarily something that a container scheduler like k8s would be concerned with) isn't really a problem (and it also opens up the potential to expose diagnostic and control endpoints).


Kubernetes supports three different types of probes, see also Kubernetes docs:

  • Running a command
  • Making an HTTP request
  • Checking a TCP socket

So, in your case you can run a command that fails when your service is unhealthy.

Also be aware that liveness probes may be dangerous to use.