Automatic Subdomain Assignment

I have a Rancher2 setup and would like to create a SaaS system where each clients software lives in it’s own container.

These containers would be generated programatically by a customer management software.

That I’m comfortable with, sort of. Where I’m scratching my head is how to set up subdomains in a automated fashion. And I’ll be honest, my knowledge of kubernetes is trivial.

Is there a way to configure ingress to automatically map subdomains to containers, without me having to explicitly create the rules?

If not, how are others approaching spinning up containers based on customer subscriptions? (With a user subscribing and a container being generated automatically) Are there any software’s out there that I can deploy to handle container and DNS management?

(I have questions regarding full domain and SSL, but subdomains is a good pla e for me to start)