.netkubernetesconsole-applicationprobe

Kubernetes readiness/liveness probe in console app


I have a console app in .net core. How to implement Kubernetes readiness/liveness probe?

My app process rabbitmq messages in loop, and don`t listen any http ports.


Solution

  • In this case, it may be better to create a sidecar container in the same pod. This container would host an ASP.NET Core site, specifically to leverage the new health checks api recently introduced in .NET Core 2.2. There are extensions for monitoring rabbitmq connectivity. You would then expose the ASP.NET Core website for health checks.

    ASP.NET Core Health Montioring

    AspNetCore.HealthChecks.Rabbitmq