The query below considers a microservice (deployment) available if at least one pod returns 200 on liveness probe.
For value mappings or Thresholds:
- 1 - Healthy
- 0 - Unhealthy
sum by(Service) (label_replace(increase(prober_probe_total{kubernetes_namespace="$namespace", kubernetes_pod=~"$service-[a-z0-9]+-[a-z0-9]+$", probe_type="Liveness", result="successful", container="main"}[5m]), "Service", "$1", "kubernetes_pod", "(.+)-[a-z0-9]{8,10}-[a-z0-9]{5}$")) > bool 0