Tenancy models & isolation
Namespace-per-team vs cluster-per-team vs vCluster; RBAC boundaries, NetworkPolicies, and where soft multi-tenancy actually ends. The core platform design question.
The mental model
Think about where people live. An apartment building packs many households behind one front door, one roof, one set of pipes. It is cheap and dense, but the walls are drywall: a loud neighbour, a kitchen fire, or a burst pipe crosses units. A row of detached houses gives each household its own foundation, its own utilities, its own lock — expensive to build and maintain, but a fire in one rarely reaches the next. A duplex with separately metered, separately keyed units sits in between: shared land and structure, but each tenant behaves as if they own the place.
Kubernetes multi-tenancy is exactly this choice. Namespace-per-team is the apartment building: one cluster, one control plane, one kernel per node, tenants separated by RBAC, quotas and network policy — dense and cheap, but the walls are software. Cluster-per-team is the detached houses: hard isolation, own control plane, own kernel, at the cost of running and upgrading N clusters. vCluster is the duplex: each tenant gets a virtual control plane inside a host namespace, so they feel like cluster admins without being able to touch anyone else.
The single idea platform engineers must internalise: **a Kubernetes namespace isolates the API, not the kernel.** RBAC decides who can call create pod; it decides nothing about who shares a CPU cache, a conntrack table, or a Linux kernel with a live CVE. That is where "soft multi-tenancy" ends, and knowing exactly where that line is — and who your tenants are — is the core platform design question. Trusted internal teams live happily in the apartment building. Hostile, untrusted tenants (SaaS customers running arbitrary code) need houses, or at least a sandboxed kernel.
- Deep dive
- Internal architecture
- Real-world use cases
- Best practices
- Common mistakes
- Performance
- Security
- Production troubleshooting
- Advantages & disadvantages
- Alternatives
- Interview expectations
- Interview questions
- Facts to remember
- Cheat sheet
- Quick revision