Organizing namespaces
Naming
Section titled “Naming”Every namespace must be named <tenant>-<name>, using your lowercased tenant name; Capsule rejects anything else at admission (see Tenancy model). Names are lowercase with hyphens, at most 63 characters including the prefix. For example:
<tenant>-prod<tenant>-staging<tenant>-experiments<tenant>-batchWhen to split
Section titled “When to split”One namespace suits most small workloads. Split when you want:
- Network policy scope: NetworkPolicies apply per namespace. See Network policies.
- Separate lifecycles: deleting a namespace removes everything in it, so keep throwaway work apart from production.
- Tidier listings:
kubectl get podsshows one project or stage at a time.
Splitting does not separate:
- Access: every tenant member is
adminin every tenant namespace. - Quota: all namespaces share the tenant’s ceiling. See Quotas.
If you need separate access or separate quota, you need a separate tenant (Cloud RAP).
Creating a namespace
Section titled “Creating a namespace”kubectl create namespace <tenant>-experimentsApplying a Namespace manifest with kubectl apply works too. There is no limit on the number of namespaces.
ArgoCD can create namespaces too, from CreateNamespace=true or a Namespace manifest, and they join your tenant the same way. A Namespace manifest makes the namespace part of the Application, so deleting the Application with its resources deletes the namespace and everything in it.
Labels and annotations
Section titled “Labels and annotations”Capsule adds capsule.clastix.io/tenant: <tenant> to every tenant namespace. Don’t remove or change it. You can add your own labels and annotations:
apiVersion: v1kind: Namespacemetadata: name: <tenant>-prod labels: environment: production team: ml-pipeline annotations: description: "Production workloads for the ML pipeline"Deleting a namespace
Section titled “Deleting a namespace”Any tenant member can delete a namespace in the tenant:
kubectl delete namespace <tenant>-experimentsDeleting the tenant itself is an RCS operation; Capsule’s preventDeletion blocks it.