Can routing rules match the path to the target namespace?

I have one Kubernetes service per namespace. New ones are added and removed frequently.

Paths such as https://example.com/namespace-a , https://example.com/namespace-b, etc., should go to the service in the relevant namespaces.

I know I can add a path-based route for each new service+namespace, but can I set a rule that will dynamically route in this way?

I do not believe there is any such rules engine to automatically create routes per namespace. You could write a simple Kubernetes controller to do it

1 Like