4 ms·
1st idea that comes to mind: 1. Package your per-tenant application into a Kubernetes pod (think of it as a lightweight VM, a collection of
by old-gregg 11y ago
1st idea that comes to mind:
1. Package your per-tenant application into a Kubernetes
pod (think of it as a lightweight VM, a collection of
Docker containers running on a same host).
2. Write a request router: someone needs to look up tenants
based on the virtual hostname in a request.
3. Use k8s API to find a pod with label == tenant. If
doesn't exist -> create one.
4. Forward the request there.
I'd imagine you'll have to "garbage collect" and gracefully shutdown pods when they sit idle for a while. I'd probably pack that logic into a pod itself.
- icebraining 11y agoI have to thank you; I had seen the Pods concept, but didn't look deeply, since it sounded like they only managed the application itself, while I also need to manage data (primarily client databases) within the pods. But now I see that Pods support some really interesting data volume management systems that could support moving it around if we need to migrate Pods between hosts. Thanks!