FluxCD

Bootstrap the cluster

Create a git repository and the bootstrap kustomization.

cluster/bootstrap/kustomization.yaml
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
  - github.com/fluxcd/flux2/manifests/install?ref=v0.33.0

Execute the following command:

kubectl apply -k cluster/bootstrap
flux create secret git gitea-deploy-key \
	--url=$REPO_URL \
	--ssh-key-algorithm=ecdsa \
	--ssh-ecdsa-curve=p521

It will output the public key which must be created as a deploy key on the repository.

Finally we can apply our flux-system kustomization.

kubectl apply -k cluster/flux/flux-system
flux reconcile source git flux-cluster