Join our Newsletter — 33% off our NHI Course
Home› Guides› Kubernetes Multi-Tenancy Security Guide: Namespaces, Isolation Models and…
Guide Cloud Security

Kubernetes Multi-Tenancy Security Guide: Namespaces, Isolation Models and Tenant Boundaries

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 27 November 2026 13 min read
On this page

A Kubernetes namespace is a naming and policy scope, not a security boundary, so a shared cluster only isolates tenants when RBAC, quotas, network policy, admission control and node or runtime isolation are layered on top of it. Platform teams share clusters to cut cost and operational effort, whether the tenants are internal teams or external customers of a SaaS product. This guide explains the tenancy models the Kubernetes project describes, from namespace per tenant to virtual control planes and dedicated clusters, and the controls that turn each into a real boundary: namespace RBAC, ResourceQuota and LimitRange, default-deny NetworkPolicy and DNS restrictions, Pod Security Admission, node isolation and sandboxed runtimes. It is written for platform engineers and security architects designing or reviewing shared clusters. For the wider hardening baseline see the Kubernetes Security Guide; for accelerators see GPU and AI Cluster Multi Tenancy Security.

Key takeaways

  • Hardness is a spectrum. The Kubernetes docs describe soft multi-tenancy (tenants trust each other to a degree) and hard multi-tenancy (tenants do not), and treat the difference as a broad spectrum, not a switch.
  • Authorisation is the main control plane boundary. Namespace-scoped RBAC, granted with RoleBindings and least privilege, is what stops one tenant reading or changing another's API objects.
  • The data plane is shared by default. All pods can talk to each other and cluster DNS answers across namespaces until NetworkPolicy and DNS policy say otherwise, and network policy only works with a CNI plugin that enforces it.
  • Containers share a kernel. For untrusted code, add dedicated nodes per tenant or sandboxed runtimes (a VM or userspace kernel per pod) selected with RuntimeClass.
  • Cluster-scoped objects need their own answer. Namespace per tenant cannot isolate CustomResourceDefinitions, StorageClasses or webhooks; a virtual control plane per tenant can, at higher cost, but still leaves the data plane to you.

Tenancy models

The Kubernetes multi-tenancy documentation separates two use cases. In multi-team tenancy, internal teams share a cluster and often have direct access with kubectl or through GitOps controllers; there is usually some trust between them. In multi-customer tenancy, a provider runs workloads for customers who have no cluster access, and workloads must be strongly isolated from each other. Organisations often run both, so decide per cluster which model applies before choosing controls.

ModelWhat tenants shareIsolation strengthCost and effortTypical fit
Namespace per tenant (soft)API server, etcd, nodes, kernel, networkControl plane isolation through RBAC and policy; data plane sharedLowest resource cost; most configuration workInternal teams with a common employer and trusted code
Namespace per tenant plus dedicated nodesAPI server, etcd, kubelet trust model; not nodesReduces noisy neighbours and limits the reach of a container escapeModerate; per-node billing is simpleRegulated teams, customers with predictable load
Namespace per tenant plus sandboxed runtimeAPI server, nodes; not the host kernel interfaceStronger workload isolation for untrusted codeRuntime overhead and compatibility testingRunning customer-supplied code or plugins
Virtual control plane per tenantWorker nodes of a host clusterIsolates cluster-scoped objects and control plane noisy neighbours; data plane still sharedExtra API server, controller manager and datastore per tenantTenants that need CRDs, webhooks or cluster-admin-like rights
Dedicated cluster per tenant (hard)Possibly the cloud account or hardwareStrongest; failures and compromise stay in one clusterHighest; fleet management neededMutually untrusted customers, strict regulatory separation

Decision guidance: start from the trust question. If a tenant compromise or a malicious tenant must never reach another tenant's data, plan for hard isolation (dedicated nodes plus sandboxing at minimum, or separate clusters). If tenants are teams under one security policy, a well-built namespace per tenant model is usually enough. Small organisations rarely gain from virtual control planes; large platform teams with hundreds of tenants often combine namespace tenancy for most teams with dedicated clusters for the few that need them. Name namespaces uniquely across the whole fleet, as the Kubernetes docs suggest, so tenants can move between shared and dedicated clusters later.

Namespaces as boundaries

Namespaces give two kinds of isolation: object names can repeat across namespaces, and many policies (Roles, RoleBindings, NetworkPolicy, ResourceQuota, Pod Security Admission labels) are namespace-scoped. The Kubernetes docs recommend giving every workload its own namespace, even when one tenant runs several workloads, so policies can be fine-grained. What a namespace does not separate:

  • Cluster-scoped resources: Nodes, PersistentVolumes, StorageClasses, CustomResourceDefinitions, ClusterRoles, admission webhooks and RuntimeClasses are shared by all tenants. Keep create and update rights on them with the platform team.
  • Nodes and kernel: pods from different namespaces can land on the same node and share its kernel unless scheduling rules prevent it.
  • Network and DNS: without policy, pods reach any pod and resolve any Service name.
  • Storage reuse: PersistentVolumes are cluster-wide even though claims are namespaced. Use dynamic provisioning, avoid node-local volume types, give tenants their own StorageClass where possible and set the reclaim policy to Delete on any shared class.

Standardise what a tenant namespace contains at creation: labels identifying the tenant, a ResourceQuota, a LimitRange, default-deny NetworkPolicies, Pod Security Admission labels and RoleBindings. See the Kubernetes Namespace Onboarding Checklist.

RBAC and quotas

The Kubernetes docs call authorisation the most important type of isolation for the control plane. Grant tenants rights with RoleBindings in their own namespaces, never ClusterRoleBindings, and split a namespace when a role would otherwise grant more than needed.

Built-in ClusterRole (bound with a RoleBinding)What it allows in the namespaceTenancy caveat
adminRead and write on most resources, including creating Roles and RoleBindings in the namespaceNo write access to ResourceQuota or the Namespace object, so tenants cannot raise their own limits
editRead and write on most objects; cannot view or modify Roles or RoleBindingsCan access Secrets and run pods as any ServiceAccount in the namespace, so it effectively holds every ServiceAccount's API rights there
viewRead-only on most objectsCannot read Secrets, because Secret contents expose ServiceAccount credentials
  • Escalation verbs: creating a Role requires holding its permissions or the escalate verb, and creating a RoleBinding requires the bound permissions or the bind verb. Never grant escalate, bind or impersonate to tenants. See Kubernetes escalate and bind Verbs and the Kubernetes RBAC Guide.
  • ResourceQuota: limits compute and the number of API objects (pods, ConfigMaps, Services) per namespace, reducing noisy neighbour effects. Once a compute quota applies, containers must declare requests and limits. Quotas apply within one namespace only and do not cover everything, such as network traffic.
  • LimitRange: sets default requests and limits and per-container minimums and maximums, so pods without values are still admitted under quota. The ResourceQuota and LimitRanger admission plugins enforce these objects and are in the default enabled set.
  • API Priority and Fairness: where tenants run controllers that call the API server, assign them priority levels so one tenant cannot starve the control plane.
  • Pod priority: restrict which PriorityClasses tenants may use, because the scheduler can pre-empt lower-priority pods to place higher-priority ones.

Where identity fits: every tenant namespace contains ServiceAccounts, and with the edit role a tenant user can act as any of them. Turn off token automounting where it is not needed, give each workload its own ServiceAccount and never bind tenant ServiceAccounts to cluster-scoped roles. See the Kubernetes NHI Security Guide.

Network isolation

By default every pod can reach every other pod and traffic is unencrypted. The Kubernetes docs recommend starting each tenant namespace with a default-deny policy plus a rule that allows DNS lookups, then adding allow rules inside the namespace. Avoid an empty namespaceSelector ({}) in policies, because it matches every namespace.

LayerControlNotes
Pod to pod (L3/L4)NetworkPolicy default deny for ingress and egress per namespaceIgnored unless the CNI plugin enforces NetworkPolicy: test it
DNSCoreDNS policy limiting lookups to the tenant's namespaceCluster DNS answers across all namespaces by default
EgressEgress NetworkPolicy, egress gateway or cloud firewallBlock cloud instance metadata endpoints from tenant pods unless needed
Service to service (L7)Service mesh authorisation and mutual TLSAdds identity-based policy and encryption; see below
External exposureRestrict Service type LoadBalancer and NodePort, Ingress or Gateway ownership; DenyServiceExternalIPs admission pluginDenyServiceExternalIPs rejects new use of the Service externalIPs field; disabled by default

Network policies apply within one control plane: pods in different virtual control planes cannot reach each other through Kubernetes networking. See the Kubernetes Network Policy Guide and Kubernetes Network Policies vs Service Mesh Policies.

Runtime and node isolation

Containers are processes on a shared kernel, which is a weaker boundary than a virtual machine. A container escape (ATT&CK T1611 Escape to Host) on a shared node puts every co-located tenant at risk. Three layers address this, and hard multi-tenancy usually needs more than one.

  • Pod Security Admission: label every tenant namespace with pod-security.kubernetes.io/enforce: restricted (or baseline where restricted breaks a workload, with a dated exception). The PodSecurity admission plugin has been stable since v1.25 and replaced PodSecurityPolicy. Tenants must not be able to change namespace labels. See the Kubernetes Pod Security Standards and Pod Security Admission Guide.
  • User namespaces: map container root to an unprivileged host user to reduce the impact of an escape. See the Kubernetes User Namespaces Guide.
  • Node isolation: dedicate node pools to a tenant with taints, tolerations and node affinity, enforced so tenants cannot add their own tolerations. The PodNodeSelector and PodTolerationRestriction admission plugins (both alpha and disabled by default) or a policy engine can force namespace-level node selectors and allowed tolerations. Enable NodeRestriction so a kubelet can only modify its own Node and the pods bound to it, and cannot change node-restriction.kubernetes.io/ labels used to steer tenants. The kubelet trust model and the API server stay shared, so the docs note a skilled attacker could still move laterally.
  • Sandboxed runtimes: RuntimeClass (node.k8s.io/v1, stable since v1.20) maps a pod's runtimeClassName to a CRI handler configured in containerd or CRI-O. Its scheduling field steers pods to nodes that have the runtime, and overhead tells the scheduler what the sandbox costs. gVisor (OCI runtime runsc) runs a userspace application kernel that services system calls itself; Kata Containers runs each pod in a lightweight VM with its own kernel. Test compatibility and performance: gVisor documents that not every system call is implemented, and both add overhead.
  • Image cache: the AlwaysPullImages admission plugin forces imagePullPolicy Always, so one tenant cannot run another tenant's private image that is already cached on a shared node without valid credentials.
OptionProtects againstTrade-off
Restricted Pod Security StandardPrivileged pods, host namespaces, hostPath, added capabilitiesSome workloads need changes; low cost
Dedicated nodes per tenantNoisy neighbours, cross-tenant reach after an escapeLower bin-packing efficiency; shared kubelet and API server remain
Userspace kernel sandboxDirect host kernel attack surfaceSystem call overhead, compatibility gaps
VM-per-pod sandboxKernel-level escape to the hostNeeds virtualisation support on nodes; memory overhead per pod

Control plane per tenant

A virtual control plane gives each tenant its own API server, controller manager and datastore while worker nodes stay in a shared host cluster (sometimes called a super-cluster). A synchronisation controller copies the objects needed to run pods between the tenant control plane and the host. The Kubernetes docs list the gains: isolation of cluster-scoped resources, no control plane noisy neighbours, a smaller blast radius for a bad policy and no conflicts between tenants' CRDs and webhooks. The costs are more resources and more components to patch and back up, plus per-tenant DNS. It does not solve data plane isolation, so the node and runtime controls above still apply.

  • Choose it when: tenants need to install CRDs, operators or admission webhooks, or expect cluster-admin-like rights, but dedicated clusters per tenant are too costly.
  • Avoid it when: tenants only deploy applications; namespace tenancy is simpler and cheaper.
  • Move to dedicated clusters when: contracts or regulators require physical or account-level separation, or tenants are mutually hostile.

Multi-tenant operators need care in any model: they should create resources in tenant namespaces, set requests and limits on the pods they create and support node isolation and sandboxed runtimes. An operator with cluster-wide write rights is a cross-tenant path. See Kubernetes Operator Security.

Detection and measurement

  • Audit logs: alert on tenant identities creating ClusterRoleBindings, changing namespace labels, using escalate, bind or impersonate, or touching another tenant's namespace (ATT&CK T1613 Container and Resource Discovery). See the Kubernetes Audit Log Detection Guide.
  • Runtime signals: privileged containers, hostPath mounts or unexpected pods in tenant namespaces (T1610 Deploy Container), exec into pods (T1609 Container Administration Command) and sustained CPU spikes that suggest T1496 Resource Hijacking.
  • Policy drift: scheduled checks that every tenant namespace still has quota, LimitRange, default-deny policies and enforce labels.

Metrics that show the boundary holds:

  1. Share of tenant namespaces with all baseline objects present (target 100%).
  2. Number of tenant subjects with any cluster-scoped binding (target zero).
  3. Share of tenant namespaces enforcing the restricted Pod Security Standard.
  4. Cross-namespace connections denied versus allowed by policy, reviewed monthly.
  5. Untrusted-code workloads running on sandboxed runtimes or dedicated nodes (target 100%).
  6. Time from tenant offboarding to namespace, volume and credential removal.

Framework mapping

Control areaNIST CSF 2.0NIST SP 800-53 Rev 5ATT&CK techniques addressed
Namespace RBACPR.AA-05AC-3, AC-6T1613
Quotas and priorityPR.IR-04SC-6T1496
Network policy and DNSPR.IR-01SC-7T1613
Pod security, sandboxing, node isolationPR.PS-01SC-39, CM-7T1611, T1610
Storage and image cache separationPR.IR-01SC-4T1610

Common failure patterns

  • Namespace treated as the boundary: tenants separated by namespace only, with no NetworkPolicy, so any compromised pod can reach every other tenant's services.
  • NetworkPolicy without enforcement: policies written for a CNI that ignores them, giving false assurance.
  • edit granted as "safe": tenant users given edit without realising it exposes every ServiceAccount and Secret in the namespace.
  • Tenants control their own labels: a tenant with rights on its Namespace object relaxes Pod Security Admission labels or node selectors.
  • Shared StorageClass with Retain: released volumes rebound to another tenant's claim.
  • Untrusted code on shared nodes: customer plugins running with the default runtime beside other customers' workloads.

Practitioner checklist

  • Record the tenancy model and trust level for each cluster, and move tenants that need hard isolation to dedicated nodes, sandboxes or clusters.
  • Create tenant namespaces from one template with labels, ResourceQuota, LimitRange, default-deny ingress and egress plus DNS allow, and restricted Pod Security Admission labels.
  • Bind tenant users with RoleBindings to admin, edit or view (or narrower custom Roles), knowing what edit implies; never grant escalate, bind or impersonate.
  • Keep cluster-scoped resources (CRDs, StorageClasses, webhooks, RuntimeClasses, PriorityClasses) under platform team control.
  • Confirm the CNI enforces NetworkPolicy and restrict CoreDNS lookups to the tenant's namespace where tenants are untrusted.
  • Enable NodeRestriction and AlwaysPullImages, and enforce tenant node selectors and tolerations.
  • Run untrusted code under a sandboxed RuntimeClass on dedicated nodes, after compatibility testing.
  • Alert on cross-namespace access and cluster-scoped binding changes, and track the six metrics above.
  • Offboard tenants completely: workloads, volumes, ServiceAccounts, external credentials and DNS records.

Standards and references

Related NHI Mgmt Group resources: Kubernetes Security Guide · Kubernetes RBAC Guide · Multi-Tenant SaaS Authorisation and Tenant Isolation Guide · GPU and AI Cluster Multi Tenancy Security

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.