System design · 13 of 16
Mid
Senior
- Monitoring and alerting for 100 servicesSRE · Platform · DevOps
- Secrets management platformDevOps · Platform · SRE
- Multi-region active-active serviceSRE · Platform
- Distributed job scheduler (cron at scale)SRE · Platform
- Internal developer platform (IDP)Platform
- Multi-tenant Kubernetes platformPlatform · DevOps · SRE
- GitOps for a fleet of 100 clustersPlatform · DevOps
- ML training platform and feature storeMLOps · Platform
- LLM inference platformMLOps · Platform · SRE
SENIOR · 13 MIN · PLATFORM · DEVOPS · SRE
Multi-tenant Kubernetes platform
Many teams on shared clusters, safely: namespaces, RBAC, quotas, network policies, admission policies, node pools and cost per team.
- Peak load
- 2,400 vCPU, 40 teams
- Availability target
- 99.95% (API)
- RTO: back up within
- 2 hours (rebuild)
- RPO: data you can lose
- 0 for stateless
← Swipe sideways to see the whole diagram →
The question
"Design a shared Kubernetes platform for 40 teams. Teams must not break or see each other's apps, and costs must be fair."
Requirements
- Each team deploys on its own, through Git.
- One team can't use all the CPU, read another team's secrets or reach its pods.
- Special workloads (GPUs, noisy batch jobs) don't hurt normal apps.
- Show cost per team.
How it works
- Each team gets one or more namespaces, created from a template: RBAC roles bound to the team's SSO group, a ResourceQuota, LimitRange defaults, and a default-deny NetworkPolicy.
- Argo CD AppProjects limit each team to its own repos and namespaces.
- Admission policies (Kyverno or OPA Gatekeeper) block risky settings: privileged pods,
latestimage tags, missing resource requests, images from unapproved registries. - Node pools with taints separate GPU, batch and system workloads; teams opt in with tolerations.
- Every resource is labelled with
team, so Kubecost or cloud tools show cost per team.
Soft vs hard isolation
| Option | Isolation | When |
|---|---|---|
| Namespaces in a shared cluster | soft: same kernel and control plane | most internal teams |
| Virtual clusters (vcluster) | medium: own API server, shared nodes | teams needing cluster-admin-like power |
| Separate clusters | hard | compliance (PCI), untrusted code, very noisy workloads |
Remember it: namespaces are folders with locks, not separate buildings. Use separate clusters when you truly need walls.
What breaks and how it heals
- Noisy neighbour: quotas and limits, priority classes, and separate node pools for heavy jobs.
- Control plane overload from one team's operator or huge watch counts: API priority and fairness, and limits on CRDs.
- Cluster upgrade affects everyone: blue-green clusters or upgrade in waves with PodDisruptionBudgets in every namespace.
Load and capacity
| Item | Assumption | Result |
|---|---|---|
| Cluster | 150 nodes × 16 vCPU | 2,400 vCPU |
| Quotas | sum of all team quotas ≤ 80% of allocatable | room for system pods and spikes |
| Pods per node | Kubernetes default max 110 | ~16,500 pods max; plan for far fewer |
| Kubernetes limits | tested up to 5,000 nodes and 150,000 pods per cluster | split into more clusters long before that |
High availability and disaster recovery
| Target | Number | How it is met |
|---|---|---|
| Control plane | 99.95% | managed control plane across 3 AZs (EKS's published SLA is 99.95%) |
| Node or AZ fails | apps keep running | node groups in 3 AZs, topology spread, PodDisruptionBudgets |
| Cluster lost | RTO ~2 hours | rebuild with Terraform, then Argo CD re-syncs every app from Git |
| Stateless apps | RPO 0 | everything is in Git |
| Stateful data | RPO 6 hours with Velero volume backups, or near 0 when data lives in managed databases | keep important data out of the cluster |
| Upgrades | no downtime | blue-green clusters or rolling node pools, one wave at a time |
What interviewers listen for
- Layers of isolation (RBAC, network, admission, quotas) and their limits.
- When to choose separate clusters.
- Cost visibility and upgrade strategy for a shared platform.