Kubernetes Namespaces, ResourceQuotas and LimitRanges for Multi-Team Clusters
Organise and govern shared clusters: namespaces per team or environment, ResourceQuotas to cap usage, LimitRanges for defaults, and pairing with RBAC.
Published December 2, 2026
When several teams share a cluster, you need boundaries: who owns what, how much each team can use, and sensible defaults so one misconfigured deployment cannot starve everyone else. Namespaces, ResourceQuotas and LimitRanges are the built-in tools for this soft multi-tenancy.
The concept
A namespace is a scope for names and policies. Most resources (pods, services, deployments, secrets) live in a namespace, and RBAC, NetworkPolicies and quotas are commonly applied per namespace. Typical layouts are one namespace per team per environment, or per application.
A ResourceQuota caps the total resources a namespace can consume: CPU and memory requests and limits, number of pods, services, PVCs and storage. Once a quota for requests exists, every pod must declare requests, which is where LimitRanges help by setting default requests and limits and min/max bounds for containers in the namespace.
Governance per namespace
Building blocks
| Object | Controls | Example |
|---|---|---|
| Namespace | Name scope, policy target | payments-prod |
| ResourceQuota | Total usage in namespace | requests.cpu: "20" |
| LimitRange | Per-container defaults and bounds | defaultRequest.memory: 256Mi |
| RoleBinding | Who can act in the namespace | payments team → edit |
| NetworkPolicy | Traffic in/out of namespace | default deny |
Quota usage at a glance
Practical examples
ResourceQuota for a team
Caps compute and object counts.
apiVersion: v1
kind: ResourceQuota
metadata: { name: team-quota, namespace: payments-prod }
spec:
hard:
requests.cpu: "20"
requests.memory: 40Gi
limits.memory: 60Gi
pods: "50"
persistentvolumeclaims: "10"
services.loadbalancers: "1"LimitRange defaults and bounds
Containers without explicit resources get these.
apiVersion: v1
kind: LimitRange
metadata: { name: container-defaults, namespace: payments-prod }
spec:
limits:
- type: Container
defaultRequest: { cpu: 100m, memory: 256Mi }
default: { memory: 512Mi }
max: { cpu: "4", memory: 8Gi }Check usage
Quota status shows used vs hard.
kubectl describe resourcequota team-quota -n payments-prodCommon mistakes
- Treating namespaces as a strong security boundary against malicious tenants (they are soft isolation).
- Quotas on requests without LimitRange defaults, so pods without requests are rejected.
- One giant namespace for everything, making RBAC and quotas impossible.
- Quotas set once and never reviewed as teams grow.
Key takeaways
- Namespaces scope names and policies.
- ResourceQuotas cap total usage per namespace.
- LimitRanges provide defaults and per-container bounds.
- Combine with RBAC and NetworkPolicies for team isolation.
FAQ
Are namespaces secure isolation?
They are soft isolation. For untrusted tenants, use separate clusters, sandboxed runtimes or virtual clusters.
Can namespaces be nested?
Not natively; hierarchical namespace controllers and virtual cluster tools add that.
Which resources are not namespaced?
Nodes, PersistentVolumes, StorageClasses, ClusterRoles and CRDs themselves are cluster-scoped.