Five teams share one cluster. How do you design tenant isolation?
AdvancedScenarioKubernetes Security
Answer
Situation read → Namespaces are a soft boundary. How far to go depends on trust between tenants.
What I'd do →
- Per-team namespaces with RBAC, ResourceQuota and LimitRange.
- Default-deny NetworkPolicies; allow only declared dependencies.
- PSA
restrictedand policy engine rules (no hostPath, no hostNetwork, approved registries only). - Node isolation for sensitive tenants: dedicated node pools with taints and tolerations.
- If tenants are untrusted (customers), use separate clusters, virtual clusters (vcluster) or sandboxed runtimes.
Why → Internal teams need guardrails; untrusted tenants need hard boundaries.
Interview tip → Say "soft multi-tenancy vs hard multi-tenancy" and when each fits.
More on Kubernetes Security
What are the 4Cs of cloud native security?BeginnerWhat happens to a request between `kubectl apply` and etcd from a security point of view?IntermediateExplain Role, ClusterRole, RoleBinding and ClusterRoleBinding.BeginnerHow do you check what a user or service account is allowed to do?BeginnerWhich RBAC permissions are effectively cluster-admin in disguise?AdvancedHow do service account tokens work now, and what is `automountServiceAccountToken`?Intermediate