You'll need a least 2 different terminals / panes.
This demo uses k9s
, but you can use whichever tool you like to view clusters.
- Create a PAT with
repo
scope and export it toGITHUB_TOKEN
. - Edit
kind.yaml
and set the value of apiServerAddress to your machines ip address (usually the first one fromhostname -I
) - Edit
tilt-settings-tenant.json
and set the value ofrepo_owner
to be your username or org. - Edit
tilt-settings-mgmt.json
and set the value ofrepo_owner
to be your username or org. - (optional) If you are SSH-ed into another machine on your LAN, add
--host 0.0.0.0
to yourtilt
commands indev-start-tenant.sh
anddev-start-mgmt.sh
. - Open a terminal window and run the following:
./dev-start-first.sh ./dev-start-tenant.sh 0
- Open the Tilt browser window (by pressing space) and wait for everything to go green.
- (optional) Open another terminal window and run
k9s --kubeconfig .tiltbuild/tenant-fleeet-tenant-0.kubeconfig
- Open another terminal window and run the following:
./dev-start-mgmt.sh
- Open the Tilt browser window (by pressing space) and wait for everything to go green.
- (optional) Open another terminal window and run:
k9s --kubeconfig mgmt.kubeconfig
- Clone down your
fleeet-demo
repo which has been created in your Github and change into it. - Create the following
Kustomization
inmgmt/fleet-objects-sync.yaml
cat <<EOF > mgmt/fleet-objects-sync.yaml --- apiVersion: kustomize.toolkit.fluxcd.io/v1beta1 kind: Kustomization metadata: name: fleet-objects namespace: flux-system spec: interval: 1m0s path: ./fleet prune: true sourceRef: kind: GitRepository name: flux-system EOF
- Create a new
podinfo
module in afleet/
directory:cat <<EOF > fleet/podinfo-module.yaml apiVersion: fleet.squaremo.dev/v1alpha1 kind: Module metadata: name: podinfo namespace: default spec: selector: {} sync: source: git: url: https://github.com/richardcase/podinfo version: tag: v0.1.0 package: kustomize: path: ./kustomize EOF
- Commit and push your changes to your
fleeet-demo
repo.
What you should see happen:
- In the management cluster you should see a module and remoteassemblage created
- In the tenant cluster you should see the following created:
- assemblage
- gitrepository
- kustomization
- Pods/svc for podinfo