I am looking to deploy a SaaS app using Kubernetes to handle the scaling. After much reading, I have come to the conclusion that multi-instance is the way to go. Ideally, I will have a user log-in and when they have authenticated, a new instance (I suppose this is a pod) will be launched and in that pod they will find the data that they worked on previously. The data will be stored in a database, ideally a separate database for each user, but maybe just one large one.
Multi-instance is a good choice because the app will allow the user to launch a Python job that runs in the pod, so having isolation from other users is very important.
I have searched all over, but I can't find many examples of multi-instance implementations. If anyone could point me to some good examples that would be great.
I imagine that I will have a separate pod running which will be the login page front end and then a simple back-end that will allow me to launch the pod.
But ... how do I tell the new pod which customer the pod is for and invoke the correct database?
Can I modify the pod template on the fly? and how do I pass the customer information, as an environment variable?
How then would I make sure I connect in the correct database for that customer?
Sorry if these are very basic questions. The implementation will be small to start off with, but I want to do my best to ensure that I have chosen the correct architecture.
Thanks in advance for any help or comments.