Kubernetes - Bootstrapping
Example:
- create a KIND cluster
- use the KIND cluster to bootstrap an admin cluster
- admin cluster manages the control planes for tenant admin cluster
- tenant cluster further manages tenant user clusters
Registry depends on storage, storage depends on registry
- option 1: ordering when setting up the clusters (registry in
systemd
with a subset of images) - option 2: kind boostrapping cluster + pivot
Bootstrap the Bootstrapper
Use a machine (or VM) as the bootstrapper, install OS and necessary tools.
Kind Cluster
- Spin up a Kind cluster
- Kind cluster - install Cluster API and other controllers
- Kind cluster - create admin cluster
- Pivot the cluster lifecycle resources into admin cluster
To list kind clusters:
kind get clusters
To delete a cluster by name:
kind delete cluster --name $name
To get kind cluster kubeconfig
kind get kubeconfig --name $name > ~/.kube/config
Pivot
Pivoting: moving objects from the ephemeral k8s cluster (the Kind cluster) to a target cluster (the newly created admin cluster).
The process:
- Pause any reconciliation of objects.
- Once all the objects are paused, the objects are created on the other side on the target cluster and deleted from the ephemeral cluster.
Delete Kind cluster.
https://cluster-api.sigs.k8s.io/clusterctl/commands/move.html#bootstrap--pivot
Create User Clusters (If Multi-tenency)
- Admin cluster - create user clusters