- k3s Kubernetes cluster
- Custom resource definition HelmChartis used.
 
- Custom resource definition 
- Git registry
- Container image registry
- NGINX ingress controller
- Kubernetes Dashboard
- Startpage (http://localhost)
Apply all manifest files
kubectl apply -k ./kustomizeAdd git repository
kubectl exec git-0 -- git-init my-repo-1
git clone http://git.localhost/my-repo-1Push image to registry
docker pull hello-world
docker tag hello-world registry.localhost/hello-world
docker push registry.localhost/hello-worldAdd the following configuration into your k3s cluster to be able to use the deployed container image registry inside the Kubernetes cluster.
mirrors:
  registry.localhost:
    endpoint:
    - http://registry.default.svcAd the following to colima configuration to set the container image registry automatically on cluster creation.
provision:
  - mode: system
    script: |
      mkdir -p /etc/rancher/k3s
      cat <<'EOF' > /etc/rancher/k3s/registry.yaml
      mirrors:
        registry.localhost:
          endpoint:
          - http://registry.default.svc
      EOFkubectl exec git-0 -- git-init k8s-localdev
git remote add local http://git.localhost/k8s-localdev.git
git push local mainkubectl apply -k flux/flux-systemPrepare the local repository
kubectl exec git-0 -- git-init k8s-localdev
git remote add local http://git.localhost/k8s-localdev.git
git push local mainInstall Flux CLI in a explicit version
curl -s https://fluxcd.io/install.sh | FLUX_VERSION=0.41.2 bash -s -- ~/.local/binFlux needs a password, create a dummy.
kubectl create namespace flux-system
flux create secret git flux-system \
  --namespace flux-system \
  --url http://git.default.svc/k8s-localdev.git \
  --username _ \
  --password _Do the bootstrap
flux bootstrap git --url http://git.localhost/k8s-localdev.git --path flux --allow-insecure-httpTheoretically the password is not needed anymore, because of the patch during the first initial setup. Therefore lets keep it clean and delete the password.
kubectl --namespace flux-system delete secret flux-systemTo be able to install flux from a local git repository through http and no authentication, the following steps were done initially. This is not needed anymore, just bootstrap from this repository.
- 
Prepare bootstrap – create a dummy password kubectl create namespace flux-system flux create secret git flux-system \ --namespace flux-system \ --url http://git.default.svc/k8s-localdev.git \ --username _ \ --password _ 
- 
Flux bootstrap flux bootstrap git \ --components-extra=image-reflector-controller,image-automation-controller \ --url=http://git.localhost/k8s-localdev.git \ --allow-insecure-http=true \ --path=flux 
- 
Patch failed bootstrap (kustomization.yaml) - force http repository
- remove secret ref
 
- 
Bootstrap again like step 2