Bootstrap
This page describes how to setup the K3S cluster on the Raspberry Pi and how to connect to the cluster on my pc.
Thereafter Flux2 should do the rest of the setup.
Initial Setup
These commands are all executed on the local host. The first one reques ssh access to the raspberry Pi on IP 192.168.8.16.
-
k3sup install --ssh-key ~/.config/ssh-ident/identities/personal/id_ed25519 --host homepi.home.bergmann.click --k3s-extra-args="--disable servicelb --disable metrics-server --disable-cloud-controller --disable-network-policy --kube-proxy-arg proxy-mode=ipvs --disable traefik --disable local-storage --flannel-backend none --cluster-cidr 10.42.0.0/16,fd53:f3c0:fefd::/48 --service-cidr 10.43.0.0/16,fde2:37f0:b85f::/112 --node-ip 192.168.8.16,fd6b:b175:9ccf:00c8::16" --k3s-channel latest --local-path ~/.config/kube/config -
kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.24.1/manifests/tigera-operator.yaml -
get secret key file 'cluster/base/flux-system/sops-secret/sops.gpg' from 1password
-
remove comment from file 'cluster/base/flux-system/kustomization.yaml'
-
kubectl apply --kustomize=./cluster/base/flux-system -
add comment back to not commit without it.
Flux
From here Flux takes control and configures the cluster. This is done in the following stages:
-
The last command of the initial setup installes (gotk-components.yaml) and configures (gotk-sync.yaml) flux. It also installs the helm repositories.
-
Thereafter flux will download the repository and start its deployment at the entrypoint.
-
First it deploys the CRDs which are needed for the next steps.
-
Then the core components are deployed.
-
Lastly all applications are deployed to the cluster.