Overlaping PathPrefix based routing gets sticky

I wonder where to dig further and it does feel like a bug...

We have two deployments on k8s:

  • service1-read PathPrefix /portal/service1/
  • service1-write PathPrefix /portal/service1/api/write

The services are discovered and all works as expected via kubernetes ingress and CRD that configures the rules.

Two days ago we've discovered this behavior:

If I bring down the service1-write, naturally the service1-read catches all the /portal/service1/api/write prefixed requests. Then I bring back the service1-write and it shows up in the services and the route is ok. I curl a new /portal/service1/api/write prefixed path and get routed correctly to service1-write. Then I curl a /portal/service1/api/write prefixed path that I've curled while service1-write was down and it still gets routed to the service1-read. Sticks to it.

It stays like that no matter the single service scale down and up, only scaling down both services and thus removing the /portal/service1/ PathPrefix rules and then bringing up restores the correct routing for the "stuck" paths.

Any pointers to where to look further? How the caching of the routes and updating works?

Thanks for any hints!

turned to be a user error :person_shrugging:
manually managed priorities...