I want to run ~10k PostgreSQL clusters.

Each cluster will be quite small with moderate traffic.

I have will have roughly 100 virtual machines. Each VM should run roughly 100 clusters. Each cluster should run in one container.

100 VMs. Each running 100 containers. One cluster per container --> 10k clusters

Features which are not available from PG out-of-the-box:


* If I create a new cluster I need to check: Which VM has room for a new cluster?
* I want to be able to move a cluster to a different VM

Before I re-invent the wheel: Is there already a PostgreSQL-way to handle such a scenario?

Does it make sense to use a [Kubernetes Postgres-Operator](https://blog.flant.com/comparing-kubernetes-operators-for-postgresql/) or Patroni?

Background: It will be some kind of open source learning/teaching environment. Each user should get full database superuser permissions. That's why it is not enough to give each user a database. Each user needs a cluster. At least that's my current impression. Please leave a comment if you have an idea for a different architecture.