Kamaji Learning¶
Learning¶
- Kamaji is a Kubernetes operator (
artifacthub.io/operator: "true",operatorCapabilities: "full lifecycle") — controller + CRDs — not just controllers like OSS vcluster. The binary's operator subcommand is literallymanager("Start the Kamaji Kubernetes Operator"). (charts/kamaji/Chart.yaml, cmd/manager/cmd.go) - The control plane runs as pods, the datastore is decoupled.
kube-apiserver/controller-manager/schedulerrun as containers in a tenantDeploymentin the Management Cluster. - etcd (or MySQL/PostgreSQL/NATS) is a separate shared backend addressed by a
DataStoreobject. (concepts/datastore) - Two CRDs, one API group —
kamaji.clastix.io/v1alpha1:TenantControlPlane(namespaced, short nametcp) andDataStore(cluster-scoped). A third,KubeconfigGenerator, is optional. (api/v1alpha1/groupversion_info.go) - cert-manager is a hard prerequisite. Kamaji's validating/mutating webhooks need TLS, and cert-manager issues those certs. Install it before Kamaji. (getting-started/kamaji-generic)
- The chart ships a datastore for you. The
kamajiHelm chart depends on thekamaji-etcdsubchart (kamaji-etcd.deploy: true), which deploys a multi-tenant etcd StatefulSet and creates aDataStorenameddefault. (charts/kamaji/values.yaml) - Upstream, unmodified Kubernetes + kubeadm. Kamaji uses vanilla images from
registry.k8s.ioand kubeadm phases, so tenant clusters are CNCF-conformant and work with standard tooling. (concepts) - The operator is configured with CLI flags (plus env via Viper). The
managersubcommand binds ~18 flags;viper.AutomaticEnv()means each has an env-var equivalent, andPOD_NAMESPACE/SERVICE_ACCOUNTare read from the environment directly. (cmd/manager/cmd.go) - Datastore selection is per-TCP, with a default. A
TenantControlPlanereferences aDataStoreby name (spec.dataStore); if omitted it inherits the operator's--datastoredefault (chart valuedefaultDatastoreName: default). You can also pin individual resources to dedicated datastores viaspec.dataStoreOverrides. (api/v1alpha1/tenantcontrolplane_types.go) - Exposure is a Service type you choose —
LoadBalancer(most common),NodePort, orClusterIP— optionally fronted by anIngressor Gateway APIGateway. The LoadBalancer IP becomes theControlPlaneEndpointworkers join. (tenantcontrolplane_types.go) - No version releases since July 2024. Open-source artifacts are the rolling
latestOCI image +0.0.0+latestHelm chart, and monthlyYY.M.N-edgereleases (e.g.26.10.2-edge). Version-pinned/stable builds are a paid CLASTIX subscription. Pin byimage.tag+ chart version in your own GitOps if you need reproducibility. (reference/versioning)
2. Installing Kamaji¶
See the Cheatsheet for the exact commands.
Cheatsheet¶
Create / inspect a tenant control plane¶
kubectl apply -f test-control-plane.yaml
kubectl -n kamaji-system get tcp,deploy,pods,svc
kubectl get datastore # cluster-scoped; see the 'default' etcd
Get kubeconfig and join a worker¶
kubectl -n kamaji-system get secret test-control-plane-admin-kubeconfig \
-o jsonpath='{.data.admin\.conf}' | base64 -d > test-control-plane.kubeconfig
JOIN_CMD=$(kubeadm --kubeconfig test-control-plane.kubeconfig token create --print-join-command)
sudo $JOIN_CMD
Uninstall¶
kubectl delete -f test-control-plane.yaml
helm uninstall kamaji -n kamaji-system
kubectl -n kamaji-system delete pvc --all
kubectl delete crd tenantcontrolplanes.kamaji.clastix.io datastores.kamaji.clastix.io kubeconfiggenerators.kamaji.clastix.io
Primary sources (repo pinned at tag 26.10.2-edge, docs read 2026-10-11):
https://github.com/clastix/kamaji
https://kamaji.clastix.io/concepts/
https://kamaji.clastix.io/concepts/datastore/
https://kamaji.clastix.io/getting-started/kamaji-generic/
https://kamaji.clastix.io/reference/configuration/
https://kamaji.clastix.io/reference/versioning/
https://kamaji.clastix.io/reference/api/
https://github.com/clastix/kamaji/blob/26.10.2-edge/cmd/manager/cmd.go
https://github.com/clastix/kamaji/blob/26.10.2-edge/cmd/migrate/cmd.go
https://github.com/clastix/kamaji/blob/26.10.2-edge/api/v1alpha1/tenantcontrolplane_types.go
https://github.com/clastix/kamaji/blob/26.10.2-edge/api/v1alpha1/datastore_types.go
https://github.com/clastix/kamaji/blob/26.10.2-edge/api/v1alpha1/groupversion_info.go
https://github.com/clastix/kamaji/blob/26.10.2-edge/charts/kamaji/Chart.yaml
https://github.com/clastix/kamaji/blob/26.10.2-edge/charts/kamaji/values.yaml
https://clastix.github.io/charts
https://github.com/clastix/kamaji-etcd