Represents the cluster state for non-production clusters
Install Flux2
Set the following environment variables:
export GITHUB_TOKEN=<your-token>
export GITHUB_USER=<your-username>
Create your dev cluster using Cluster API (see *****) or locally using kind:
kind create cluster --name=kubecoins-dev
Check Flux2 pre-reqs:
flux check --pre
Bootstrap Flux for dev (if using CAPI change the context name):
flux bootstrap github \
--context=kind-kubecoins-dev \
--owner=${GITHUB_USER} \
--repository=flux-nonprod-clusters \
--branch=main \
--personal \
--path=clusters/dev
Then setup the cluster for staging using CAPI or kind:
kind create cluster --name=kubecoins-staging
flux bootstrap github \
--context=kind-kubecoins-staging \
--owner=${GITHUB_USER} \
--repository=flux-nonprod-clusters \
--branch=main \
--personal \
--path=clusters/staging
This is based on this Flux2 sample and the GitOps at Scale work from Weaveworks.