postgres-operator
postgres-operator copied to clipboard
Postgres Operator setup for Kubernetes cluster
- Which image of the operator are you using? e.g. ghcr.io/zalando/postgres-operator:v1.12.2
- Where do you run it - cloud or metal? Kubernetes or OpenShift? K8s
- Are you running Postgres Operator in production? yes
- Type of issue? question
Hi,
We are using the Postgres Operator in a setup where we have a lot of different users on a Kubernetes cluster with some isolation level applied. This means each user might have multiple Postgres instances running in one or multiple namespaces.
Now my question is, what is the best approach for deploying the Postgres Operator in such a case:
- Should every Postgres instance have its own Operator running (could be multiple Operators in one namespace)
- Install a cluster-wide Postgres Operator to manage all Postgres instances across all namespaces
- Create one Operator per each namespace (so max one Operator in a namespace but possibly multiple Postgres instances)
I think a cluster wide Postgres Operator is good to go if all instances can share common operator-level configurations (e.g., backups, connection pooling, etc.). This will be easy to manage. Otherwise you will have to manage RBAC for each operator if not doing cluster-wide
First of all, thanks for your answer. I would like to clarify our use case a little bit more. We are building a multi-tenant platform, where every tenant can provision postgresql based on their needs. Tenant's deployments are separated on kubernetes namespace level, multiple tenants in the same cluster. In some cases, tenants might require additional security measures to be enforced (rbac security, network policies, etc). Are there any risks with having the operator deployed cluster-wide for a multi-tenant use case? Would it make sense to deploy the operator per tenant/namespace rather than to do it cluster-wide?