I have an application running in Kubernetes. To take the advantage of rolling updates with no downtime, I have to implement the proper Health Checks, so the cluster can know when the application/container is ready to handle requests.
I'm trying to use the new ASP.NET Code 2.2 Healthchecks feature.
I should return a Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckResult
struct with the status of the application.
This struct has 3 static methods that I can use to return this status:
- Healthy
- Unhealthy
- Degraded
In which situations that the app is not OK that I should use Unhealthy vs Degraded? A few examples would be good.