Capsule

Capsule is a multi-tenancy framework for Kubernetes. Give teams the freedom to create and manage their own namespaces. Keep access, resource budgets and policies under platform control.

Adopted by

Running Capsule? Add your organisation.

The problem

Kubernetes namespaces have no hierarchy. Clusters with multiple teams or customers face hard choices:

Namespaces

Cluster admins become a bottleneck, and developers cannot list their own namespaces.

Custom CRD

Your teams learn an API that exists on your cluster and nowhere else.

Multiple Clusters

Another control plane per team to upgrade, secure and pay for.

How Capsule works

Capsule groups a team’s namespaces into a tenant. Admins set the rules, while teams manage their own namespaces.

Cluster admin

Tenants define access and rules that every team namespace inherits. Capsule is completely declarative and GitOps ready.

tenant.yaml
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
apiVersion: capsule.clastix.io/v1beta2
kind: Tenant
metadata:
  name: solar
spec:
  owners:
    - kind: User
      name: alice
  forceTenantPrefix: true
  rules:
    - quota:
        - name: shared-compute
          hard:
            requests.cpu: "8"
            requests.memory: 16Gi

Tenant owner

Owners create ordinary namespaces without cluster-admin rights or a ticket. With the optional Capsule Proxy, listed namespaces are scoped to the tenant.

alice@laptop
$ kubectl create namespace solar-dev
namespace/solar-dev created

$ kubectl create namespace solar-prod
namespace/solar-prod created

$ kubectl get namespaces
NAME         STATUS   AGE
solar-dev    Active   2m
solar-prod   Active   1m

Capsule enforces the boundaries

Capsule grants owners access, applies configured quotas and policies, and rejects requests outside the tenant’s rules.

alice@laptop
$ kubectl create namespace experiments
The Namespace name must start with 'solar-'
when ForceTenantPrefix is enabled in the Tenant.

$ kubectl apply -f pod.yaml
resource exceeds GlobalResourceQuota
"solar-shared-compute": requests.cpu (requested=2,
current=7, projected=9, hard=8, exceededBy=1)

Features

Tenants

Group namespaces by team, product, or customer. Owners manage namespaces and grant developers access to deploy applications.

Tenant docs

Resource Management

Distribute CPU, memory, and storage budgets across namespaces with flexible claiming rather than fixed per-namespace quotas.

Resource management

Policy rules

Enforce allowed registries, pull policies, and namespace metadata requirements on a per-tenant basis.

Policy rules

Replications

Propagate Kubernetes resources (Secrets, NetworkPolicies, etc.) across tenant namespaces automatically.

Replications

Capsule Proxy

Let teams list only their tenant’s namespaces, pods and volumes through the standard Kubernetes API, using their existing tools.

Capsule Proxy docs

Integrations

Tenant namespaces are ordinary namespaces, so your tools keep working. These integrations make them tenant-aware.

See the whole ecosystem

Try Capsule

Capsule is a CNCF Sandbox project built in the open across 🇮🇹 🇨🇭 🇧🇬 🇳🇱