Getting Started
Verified against the Helm chart version 0.12.4. Commands assume a working cluster and a configured
kubectlcontext.
Prerequisites
- Helm 3.
- Kubernetes v1.16 or later, with the
MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota, andLimitRangeradmission plugins enabled (source 6). kubectlpointed at the cluster where you have cluster-admin rights.
Install
Install from the Open Container Initiative (OCI) registry:
helm install capsule oci://ghcr.io/projectcapsule/charts/capsule \
--version 0.12.4 -n capsule-system --create-namespaceThe HTTP chart repository works too:
helm repo add projectcapsule https://projectcapsule.github.io/charts
helm install capsule projectcapsule/capsule \
--version 0.12.4 -n capsule-system --create-namespaceA first working setup
Confirm the controller is running.
bashkubectl get pods -n capsule-systemCreate a tenant owned by a user named
alice. TheTenantCRD is cluster-scoped, so no namespace is needed.bashkubectl apply -f - <<'EOF' apiVersion: capsule.clastix.io/v1beta2 kind: Tenant metadata: name: oil spec: owners: - name: alice kind: User EOFInspect the tenant. The print columns show its namespace quota, namespace count, and Ready state.
bashkubectl get tenant oil
When alice creates a namespace, the mutating webhook sets the tenant as its owner reference and the validating webhook checks quota, prefix, and metadata before it persists.
Verify it works
Check that the tenant reports an Active state and that its conditions are Ready:
kubectl get tenant oil -o jsonpath='{.status.state}{"\n"}'A healthy install prints Active. You can also confirm the admission webhooks are registered:
kubectl get validatingwebhookconfigurations | grep capsule
kubectl get mutatingwebhookconfigurations | grep capsuleWhere to go next
The official documentation covers production concerns this page does not: high availability, certificate management for the webhooks, resource pools for shared quota, and the rule and enforcement model. Start at the installation and operating guides (source 6) and the main documentation site (source 5).