camzabriskie.com

Primers › Deployment

Separating customers, from own cluster to fully pooled

04 / 06 updated Oct 23, 2026
On this page
  1. A few terms
  2. The rungs
  3. Own cluster in a shared account
  4. Namespace per customer
    1. What a namespace doesn’t separate
    2. What it buys
  5. Shared app, separate data
  6. Fully pooled
  7. Side by side
  8. Mixing rungs
  9. Choosing a rung
  10. References

The self-service environments primer named the two ends of customer separation: silo, where each customer gets their own resources, and pool, where they share. This primer walks the rungs between them, from each customer having their own AWS accounts down to everyone sharing one app and one database. The next two primers build the two ends: an AWS account set per customer for the most separated, and the fully pooled version for the least.

The running example is still Ledgerly, the made-up invoicing app on Kubernetes. Acme pays for its own accounts, the top rung. Three smaller customers, Birch, Cedar, and Dune, have signed a cheaper plan, and Ledgerly has to decide how much of the platform they share.

A few terms

The rungs

Each rung down shares one more thing. The first two keep a copy of the app per customer; from the third rung on, one copy of the app serves several customers.

RungEach customer getsShared with other customersOne copy of the app per customer?
Own accountsAccounts, cluster, databaseThe platform and the releaseYes
Own clusterCluster, databaseThe AWS accountYes
Namespace per customerNamespace, databaseCluster and nodesYes
Shared app, own dataA database or schemaCluster, nodes, the running appNo
Fully pooledRows with their tenant IDEverythingNo

Through the namespace rung, each copy of Ledgerly serves exactly one customer, so the app’s code doesn’t need to know customers exist; the platform keeps them apart. From the shared-app rung down, the app itself has to keep them apart, which makes it a change to the product, not just the platform.

Teal marks running copies of the app. Moving right, there are fewer of them and less in the database for each customer, and the app has to do more of the separating.

Own cluster in a shared account

Every customer still gets their own EKS cluster and database, but they share one AWS account. The EKS guide calls a cluster per tenant hard multi-tenancy and says the cluster is “the only construct that provides a strong security boundary” in Kubernetes [2].

Dropping the separate accounts gives up what they provided: a bill per customer, separate quotas, and a hard IAM wall (the account-per-customer primer lists them). It keeps most of the cost, since each cluster’s control plane is paid for separately and compute can’t be shared between clusters [2]. It suits customers who need their own cluster but not their own bill, or a step on the way to separate accounts.

Namespace per customer

The cluster is shared and each customer gets a namespace, a named slice of the cluster that most Kubernetes objects live inside. Birch’s copy of Ledgerly runs in namespace birch, Cedar’s in cedar. Each copy still serves one customer, so the app doesn’t change; the platform’s onboarding step creates a namespace instead of an account.

A namespace on its own keeps nothing apart. The EKS guide lists the pieces that turn it into a tenant boundary, which it calls soft multi-tenancy [2]:

PieceWhat it stopsPer namespace
RBAC roles and role bindingsPeople and service accounts touching another tenant’s objects [2]A Role and RoleBinding
Resource quotaOne tenant using up the cluster’s CPU, memory, or object count [6]A ResourceQuota
Limit rangeOne pod taking all of its namespace’s quota, and pods with no limits set [7]A LimitRange
Network policyPods in one namespace talking to another’sA default-deny policy, plus allow rules
IAM role for the appOne customer’s app reading another’s bucket or databaseA service account tied to its own IAM role (Pod Identity [8])
Its own databaseData mixingAn RDS instance or database per customer

Network policies need the most care. By default every pod in a cluster can reach every other pod, and the EKS guide recommends starting from a rule that denies all pod-to-pod traffic, plus one that lets pods reach the DNS server, then adding narrower allow rules [2]. Policies only take effect if the cluster’s network plugin enforces them [9]; on EKS, the VPC CNI plugin supports them [10]. The default-deny policy for Birch’s namespace looks like this:

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: default-deny
  namespace: birch
spec:
  podSelector: {}          # every pod in the namespace
  policyTypes: [Ingress, Egress]
  # no rules listed, so nothing is allowed in or out

Next to it go a policy allowing egress to the cluster DNS, one allowing traffic from the ingress controller, and one allowing egress to Birch’s database.

What a namespace doesn’t separate

None of the pieces above stop pods from different tenants landing on the same node, and the EKS guide points out that an attacker who gets onto a node can read the Secrets, ConfigMaps, and volumes mounted there [2]. Other things stay shared too:

The guide’s mitigations are to pin each tenant’s pods to their own nodes with node affinity and taints, which it warns gets complicated and expensive with many tenants, and to run containers in sandboxes or enforce rules with a policy engine such as OPA Gatekeeper or Kyverno [2], [12]. Between a namespace and a cluster each sits a virtual control plane per tenant, its own Kubernetes API server on shared nodes, which the Kubernetes docs suggest “when namespace isolation is insufficient but dedicated clusters are undesirable” [11].

What it buys

Onboarding Birch now means creating a namespace, its policies, and a database, which is much quicker than building a cluster [2]. Compute is shared, so three small customers can fill one set of nodes rather than idling on three clusters. And the platform from the earlier primers barely changes: the customer file points at a namespace instead of an account, and Argo CD deploys one copy per namespace the same way it deployed one per cluster.

Shared app, separate data

Here the copies of the app collapse into one. A single Ledgerly deployment serves Birch, Cedar, and Dune, and each request carries its tenant context. Data is still separated: each customer has their own database or schema.

For PostgreSQL, AWS’s guidance calls this the bridge model: one database server, with tenants separated by a PostgreSQL database each or a schema each [13]. The app has to keep a mapping from tenant to database or schema and connect to the right one for every request [13]. Noisy neighbors come back, because everyone’s queries share one server, and onboarding still means creating a database or schema per tenant [13].

This rung adds tenant context. AWS’s SaaS guidance recommends binding each user to a tenant at sign-in, so the tenant ID travels in the user’s token, for example as a claim in a JSON Web Token, and every service can read it without asking another service [4]. Ledgerly’s login would issue a token saying tenant: birch, and the app uses that, never a value the browser could change, to pick Birch’s schema.

Fully pooled

The least separated rung. One deployment, one database, one set of tables, and every row carries a tenant_id. Adding Dune is adding a row to a tenants table.

AWS’s PostgreSQL guidance calls row-level security required for this model [14]. Without it, every query in the codebase has to remember WHERE tenant_id = …, and one forgotten clause shows one customer another’s invoices. With it, the database adds the filter itself. The recommended pattern sets a per-session variable to the current tenant and writes the policy against it, rather than creating a database user per tenant [14]:

ALTER TABLE invoices ENABLE ROW LEVEL SECURITY;

CREATE POLICY tenant_isolation ON invoices
  USING (tenant_id = current_setting('app.current_tenant')::uuid);

-- the app, at the start of each request, from the tenant in the user's token:
SET app.current_tenant = '6f1c…';   -- Birch's tenant ID
SELECT * FROM invoices;             -- only Birch's rows come back

Three details from the PostgreSQL docs decide whether the policy protects anything [5]:

So the app must connect as an ordinary role that doesn’t own the tables, or the policy quietly does nothing.

According to AWS, pooling is the cheapest and simplest to run and makes onboarding fast because no infrastructure is created [15]. But noisy neighbors can be reduced, not eliminated; seeing which tenant is using what needs instrumentation in the app, since the database doesn’t know about tenants; and some customers won’t accept rows in a shared table as separation [15]. An outage of the shared database is an outage for every customer [16].

Side by side

Own clusterNamespaceShared app, own dataFully pooled
Adding a customerBuild a cluster and databaseNamespace, policies, databaseA database or schemaA row
App knows about tenantsNoNoYesYes
Where separation livesThe cluster boundaryKubernetes policiesApp picks the schema; the database keeps them apartApp sets the tenant; RLS filters
Noisy neighborsNone in computeShared nodes, capped by quotasShared app and database serverEverything shared
One failure reachesOne customerEvery customer, if it’s the clusterEvery customerEvery customer
Cost per extra customerA clusterA namespace’s share of nodes, a databaseA schemaClose to nothing
What a security review hearsSeparate infrastructureSeparate namespaces and policies on shared nodesSeparate schemas in a shared serverRows filtered by the database

Mixing rungs

Most SaaS products end up on more than one rung. AWS describes the common shape: basic-tier tenants in a pooled environment and premium tenants with their own stacks, all on the same version [17]. The bridge model also works per component, with some services pooled and others siloed depending on their data and load [18].

For Ledgerly that could mean Acme in its own accounts, Birch, Cedar, and Dune pooled, and a regulated customer next year somewhere in between. Two choices make that mix manageable:

Choosing a rung

The questions that usually decide it:

  1. What has the customer contract promised? “Our data never shares a database server with anyone” rules out the bottom two rungs no matter what they’d save.
  2. Does the app know about tenants today? If not, the namespace rung is the cheapest separation available without changing the product. Moving below it is a project for the application team, not the platform team.
  3. How many customers, and how small? Silos cost roughly the same whether a customer is big or tiny, so a long tail of small customers is where pooling pays.
  4. Do customers run their own code in the platform? If they do, shared nodes and a shared cluster become much riskier, and the EKS guide’s sandboxing and per-tenant node advice stops being optional [2].

References

Show all 18 sourcesHide sources
  1. [1] ↩ Amazon Web Services, “Silo, pool, and bridge models,” SaaS Lens, AWS Well-Architected Framework. Accessed: Oct. 23, 2026. [Online]. Available: https://docs.aws.amazon.com/wellarchitected/latest/saas-lens/silo-pool-and-bridge-models.html
  2. [2] ↩ a b c d e f g h i j k Amazon Web Services, “Tenant Isolation,” Amazon EKS Best Practices Guide. Accessed: Oct. 23, 2026. [Online]. Available: https://docs.aws.amazon.com/eks/latest/best-practices/tenant-isolation.html
  3. [3] ↩ Amazon Web Services, “Noisy neighbor,” SaaS Lens, AWS Well-Architected Framework. Accessed: Oct. 23, 2026. [Online]. Available: https://docs.aws.amazon.com/wellarchitected/latest/saas-lens/noisy-neighbor.html
  4. [4] ↩ a b Amazon Web Services, “Identity and access management,” SaaS Lens, AWS Well-Architected Framework. Accessed: Oct. 23, 2026. [Online]. Available: https://docs.aws.amazon.com/wellarchitected/latest/saas-lens/identity-and-access-management.html
  5. [5] ↩ a b The PostgreSQL Global Development Group, “Row Security Policies,” PostgreSQL Documentation. Accessed: Oct. 23, 2026. [Online]. Available: https://www.postgresql.org/docs/current/ddl-rowsecurity.html
  6. [6] ↩ The Kubernetes Authors, “Resource Quotas,” Kubernetes Documentation. Accessed: Oct. 23, 2026. [Online]. Available: https://kubernetes.io/docs/concepts/policy/resource-quotas/
  7. [7] ↩ The Kubernetes Authors, “Limit Ranges,” Kubernetes Documentation. Accessed: Oct. 23, 2026. [Online]. Available: https://kubernetes.io/docs/concepts/policy/limit-range/
  8. [8] ↩ Amazon Web Services, “Learn how EKS Pod Identity grants pods access to AWS services,” Amazon EKS User Guide. Accessed: Oct. 23, 2026. [Online]. Available: https://docs.aws.amazon.com/eks/latest/userguide/pod-identities.html
  9. [9] ↩ The Kubernetes Authors, “Network Policies,” Kubernetes Documentation. Accessed: Oct. 8, 2026. [Online]. Available: https://kubernetes.io/docs/concepts/services-networking/network-policies/
  10. [10] ↩ Amazon Web Services, “Limit Pod traffic with Kubernetes network policies,” Amazon EKS User Guide. Accessed: Oct. 23, 2026. [Online]. Available: https://docs.aws.amazon.com/eks/latest/userguide/cni-network-policy.html
  11. [11] ↩ a b The Kubernetes Authors, “Multi-tenancy,” Kubernetes Documentation. Accessed: Oct. 23, 2026. [Online]. Available: https://kubernetes.io/docs/concepts/security/multi-tenancy/
  12. [12] ↩ The Kubernetes Authors, “Runtime Class,” Kubernetes Documentation. Accessed: Oct. 23, 2026. [Online]. Available: https://kubernetes.io/docs/concepts/containers/runtime-class/
  13. [13] ↩ a b c Amazon Web Services, “PostgreSQL bridge model,” Using managed PostgreSQL for multi-tenant SaaS applications on AWS (AWS Prescriptive Guidance). Accessed: Oct. 23, 2026. [Online]. Available: https://docs.aws.amazon.com/prescriptive-guidance/latest/saas-multitenant-managed-postgresql/bridge.html
  14. [14] ↩ a b Amazon Web Services, “Row-level security recommendations,” Using managed PostgreSQL for multi-tenant SaaS applications on AWS (AWS Prescriptive Guidance). Accessed: Oct. 23, 2026. [Online]. Available: https://docs.aws.amazon.com/prescriptive-guidance/latest/saas-multitenant-managed-postgresql/rls.html
  15. [15] ↩ a b Amazon Web Services, “PostgreSQL pool model,” Using managed PostgreSQL for multi-tenant SaaS applications on AWS (AWS Prescriptive Guidance). Accessed: Oct. 23, 2026. [Online]. Available: https://docs.aws.amazon.com/prescriptive-guidance/latest/saas-multitenant-managed-postgresql/pool.html
  16. [16] ↩ Amazon Web Services, “Pool isolation,” SaaS Tenant Isolation Strategies (AWS whitepaper), Aug. 2020. Accessed: Oct. 23, 2026. [Online]. Available: https://docs.aws.amazon.com/whitepapers/latest/saas-tenant-isolation-strategies/pool-isolation.html
  17. [17] ↩ a b Amazon Web Services, “Full stack silo and pool,” SaaS Architecture Fundamentals (AWS whitepaper). Accessed: Oct. 23, 2026. [Online]. Available: https://docs.aws.amazon.com/whitepapers/latest/saas-architecture-fundamentals/full-stack-silo-and-pool.html
  18. [18] ↩ Amazon Web Services, “The bridge model,” SaaS Tenant Isolation Strategies (AWS whitepaper), Aug. 2020. Accessed: Oct. 23, 2026. [Online]. Available: https://docs.aws.amazon.com/whitepapers/latest/saas-tenant-isolation-strategies/the-bridge-model.html

Every source cited across the primers is collected on one page.