To start this tutorial, you'll need to have access to a working Kubernetes cluster.
We'll use minikube in our tutorial.
Take care of which version of minikube you have installed - recently some minkube/Kubernetes version were incompatible on Ubuntu.
You can definitely use the cloud shell minikube accessible from the internet: shell.cloud.google.com
Once minikube is installed, you can start your cluster with minikube start
.
Ensure your cluster is running with the following command :
$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
minikube Ready control-plane,master 87s v1.22.3
The flux cli will help us administer the flux ressources; install it following the documentation linked here : https://fluxcd.io/docs/installation/.
On linux, you can install it with curl -s https://fluxcd.io/install.sh | sudo bash
.
Check it is correctly installed with the following command :
$ flux --version
flux version 0.31.5
You can use a Gitlab / Other git repo account with Flux, however this tutorial will only cover how to use flux with Github. See the installation documentation for the other servers.
You'll need a Github account to create a repository and push commits to it. Moreover, you'll need to create a Personal Access Token to allow flux to create a Deploy Key (linked to this PAT); to do so, follow this link (permissions should be repo:*).
Copy the generated PAT and save it in an environment variable :
export GITHUB_TOKEN="<your-token>"
You won't be able to access the token once you've closed the page, so be sure to have it saved somewhere !
You should just follow each instruction file, one after the other. The solutions
folder contains the state of the repository you should have after each instruction.
You can run pre-installation check by running
flux check --pre
Go to step 1