Prompt
I'm building a multi team container platform, how do I manage access and isolation?
Latest observation
For a multi-team container platform, the goal is to combine strong isolation, least-privilege access, and clear operational boundaries. A good approach is to design access at multiple layers: identity, cluster, namespace, network, runtime, and supply chain.
1) Start with a clear tenancy model
Decide whether teams need:
- Soft multi-tenancy: teams share clusters but are isolated by policy and RBAC.
- Hard multi-tenancy: stronger separation, often separate clusters for higher-risk teams or regulated workloads.
If teams are untrusted or highly regulated, prefer:
- Separate clusters per environment or business unit
- Or at minimum, separate clusters for “shared services” vs “tenant workloads”
2) Use centralized identity and RBAC
Integrate the platform with your IdP:
- SSO via OIDC/SAML
- Group-based access mapped to roles
Typical roles:
- Platform admins: manage cluster-wide config
- Team admins: manage their namespace/project
- Developers: deploy and inspect within their scope
- Read-only/auditors: logs, metrics, events only
Best practices:
- Use least privilege
- Avoid shared admin accounts
- Grant access by group membership, not individuals
- Separate human access from automation access
3) Isolate teams with namespaces/projects
Use a namespace-per-team or namespace-per-app model:
- One namespace per team for ownership
- One or more namespaces per environment:
team-a-dev,team-a-prod
Apply:
- RBAC scoped to namespace
- Resource quotas
- LimitRanges
- Default deny policies
This helps prevent noisy neighbors and accidental cross-team access.
4) Enforce network segmentation
By default, allow nothing between namespaces unless explicitly approved.
Use:
- NetworkPolicies to control pod-to-pod traffic
- Separate ingress/egress controls
- Restrict access to shared services with explicit allow rules
- Consider service mesh mTLS if you need stronger service identity and encryption
Patterns:
- Default deny all ingress and egress in tenant namespaces
- Allow only:
- same-namespace traffic
- approved shared services
- DNS and required platform endpoints
5) Tighten workload security
Make it hard for one workload to escape its boundary.
Use pod security controls:
- Run as non-root
- Drop Linux capabilities
- Use read-only root filesystems where possible
- Disallow privileged containers
- Restrict hostPath, hostNetwork, hostPID, hostIPC
- Use seccomp/AppArmor/SELinux where available
Use admission controls to enforce standards:
- Pod Security Admission or equivalent
- Policy engines like OPA Gatekeeper or Kyverno
6) Separate compute where needed
For stronger isolation, use:
- Dedicated node pools per team or trust tier
- Taints/tolerations to keep workloads separated
- Separate clusters for highly sensitive workloads
Examples:
sharednode pool for low-risk appsregulatednode pool with stricter controls- GPU or high-memory pools isolated by team or use case
7) Control secrets carefully
Secrets are often the weakest part of multi-tenancy.
Use:
- External secret manager integration
- Per-team secret scopes
- Encryption at rest
- Short-lived credentials where possible
- Avoid copying secrets between namespaces
Do not:
- Store secrets in plain manifests
- Share service account tokens broadly
8) Secure the supply chain
Restrict what can be deployed.
Require:
- Images from trusted registries only
- Image scanning
- Signed images if possible
- CI/CD to deploy using service accounts with limited scope
- Approval workflows for production
Admission policies can enforce:
- Allowed registries
- Required labels/annotations
- No
latesttags - Signed image verification
9) Make observability tenant-aware
Teams should see only what they should.
Partition:
- Logs
- Metrics
- Traces
- Events
Ensure:
- Namespace/team scoping in dashboards
- Restricted access to cluster-wide telemetry
- Audit logs for access and configuration changes
10) Protect the control plane
The biggest risk in shared environments is cluster-level privilege escalation.
Protect:
- kubeconfig distribution
- API server access
- node access
- privileged DaemonSets
- cluster-scoped CRDs and operators
Only a small platform team should have cluster-admin.
11) Define guardrails and self-service
Good multi-team platforms give autonomy within boundaries.
Provide:
- Templates and golden paths for app deployment
- Pre-approved ingress, secret, and database patterns
- Self-service namespace creation
- Automated policy checks in CI/CD
This reduces manual exceptions and improves consistency.
12) Plan for exceptions and break-glass access
You will need emergency access.
Have:
- A documented break-glass process
- Time-bound elevated access
- Audit trails
- Post-incident review for all elevated actions
A practical baseline design
A common starting point:
- One cluster per environment: dev/stage/prod
- Namespace per team/app
- Central SSO with group-based RBAC
- Default-deny NetworkPolicies
- Resource quotas and Pod Security restrictions
- Separate node pools for sensitive workloads
- Central policy engine for admission controls
- Locked-down secrets management
- Full audit logging
Rule of thumb
If two teams should not be able to break each other’s workloads accidentally, use namespaces + RBAC + network policies.
If they should not be able to break each other at all, use separate node pools or separate clusters.
If you want, I can turn this into:
- a reference architecture,
- a Kubernetes RBAC / NetworkPolicy example, or
- a multi-tenant platform checklist.