Getting 404 if one of the kubernetes service configured in traefikservice doesn't have pods in it

I have two deployments named blue & green and also have their respective blue & green kubernetes service for it.
I have one ingressroute which routes to traefikservice.
In traefikservice i have weighted approach, here i added blue & green kubernetes service.
If any pods (may be blue / green) goes down then entire routing becomes down.
My expectation is whenever blue pod goes down, it need to route to green pod alone and vice versa.
How to achieve this in traefik ???

Hello @prakash,

Thanks for your interest in Traefik,

If I sum up correctly, the IngressRoute is forwarding the Traefik to a weighted round-robin balancer that contains the blue and green services, and when one is down the entire router is dropped.

The described behavior is the default one in Traefik. You can use the allowEmptyServices configuration option of the provider to prevent the router from disappearing. In addition, you will have to update the weight of the blue or green service before scaling it down, otherwise, the service without any pods would reply with 503.

Some tools like Traefik Canary Deployments - Flagger could help to automate deployments.

Hope this helps!