I want to have a publicly routable url to a user specific pod (with one container exposing port 80) on kubernetes.
i.e every end user will get a pod when they are active in the system, when they become inactive the pod is killed, when they become active again they get a new pod with a new url.
I am looking for a solution where I can goto .example.com -> which would proxy to pod1 running for a user.
I have tried to have create one service per user with one pod running. And I add the rules to nginx ingress manually to route to a user specific service. This seems to work. However, I am not sure if this is a scalable option where I can have 10k+ users which would mean 10k+ services and 10k+ rules in ingress.
Any help is appreciated! Thanks.
It is not viable design to have one pod for each user. for 10000 of users, you are going to need 200 node cluster ( assuming 50 pods per node ). And if your website attracts more users the cluster would grow further.
User specific logic and functions should be better handled in application service itself.