A hands-on guide to installing FluxCD: checking cluster and token prerequisites, choosing the installation method, running flux bootstrap github along with its available options, and verifying the installation with flux check.

In episode 3 you gained a deep understanding of the GitOps Toolkit architecture — from the Source Controller to the Image Automation Controllers. Now theory turns into practice: we're going to install FluxCD on your cluster. This episode is the first moment where all the preparation from episode 0 is truly put to the test.
There's good news: unlike installing conventional tools, FluxCD offers flux bootstrap — a single command that does everything: creates the namespace, installs the controllers, writes the manifest files into Git, and configures FluxCD to manage itself through Git. This is a major reason GitOps is so popular.
Before running anything, make sure the following prerequisites are met.
FluxCD requires a stable Kubernetes cluster, version 1.23 or newer. Local clusters like kind or minikube are fine for a lab. Make sure your kubectl context points to the correct cluster:
kubectl config current-context
kubectl cluster-info
kubectl get nodesFluxCD needs write access to a Git repository to write the bootstrap manifests. Prepare a Personal Access Token from GitHub, GitLab, or Bitbucket with repo permissions (for GitHub, the repo scope). For GitHub you also must export your username as an environment variable:
export GITHUB_TOKEN=<your-token>
export GITHUB_USER=<your-username>The destination repository can be empty or already exist. FluxCD will create the branch and directory structure it needs there. A common layout uses ./clusters/<cluster-name>/ as the cluster configuration root.
Important
The token exported with export only lives in the active shell. Don't write it into a script that gets committed, and remember that GITHUB_TOKEN and GITHUB_USER are variables read automatically by flux bootstrap github.
There are four paths to install FluxCD:
| Method | Characteristics | Recommendation |
|---|---|---|
flux bootstrap | Fully automatic, self-managed via Git | Most recommended |
flux install | Manual, without writing to Git | Quick lab |
| Terraform provider | IaC Terraform integration | Teams already using Terraform |
| Helm chart | Install via a Helm chart | Heavy Helm users |
In this episode we focus on flux bootstrap, because it produces the setup most aligned with the GitOps philosophy: the cluster configuration lives in Git from the very first minute.
The bootstrap command for GitHub:
flux bootstrap github \
--owner=$GITHUB_USER \
--repository=gitops \
--branch=main \
--path=./clusters/my-cluster \
--personalFor GitLab or other providers, the command is similar with different names:
flux bootstrap gitlab \
--owner=acme \
--repository=gitops \
--branch=main \
--path=./clusters/my-cluster
flux bootstrap git \
--url=ssh://git@github.com/acme/gitops.git \
--branch=main \
--path=./clusters/my-clusterTip
Use --personal when the repository is owned personally (not an organization). For organizations, drop this flag so FluxCD creates a dedicated deploy token with limited rights.
flux bootstrap works through several stages automatically:
flux-system namespace in the cluster.--path.The result: the cluster and repository are fully connected within minutes, and all of FluxCD's own configuration can be reviewed through PRs.
--branch=<name> sets the branch to use; default is main.--path=./clusters/<name> is the cluster configuration root; many clusters can live in one repo.--components=source-controller,kustomize-controller for a partial install (for example without the Helm controller).--network-policy control the controller's ingress/egress access in the flux-system namespace.--kustomization-override or --image-ref for advanced customization.After bootstrap finishes, verify with two quick checks. First, check the components and connections:
flux check
flux get kustomizationsSecond, look at the running controller pods directly:
kubectl get pods -n flux-system
kubectl get gitrepositories -n flux-systemWarning
If flux check reports components that aren't ready, don't continue. Inspect the pod logs with kubectl logs -n flux-system -l app=kustomize-controller and make sure the Git token is still valid.
Congratulations — FluxCD is now running on your cluster. Key takeaways:
flux install, Terraform, and the Helm chart are alternatives.flux check and kubectl get pods -n flux-system confirm everything is healthy.In episode 5 we master your main daily weapon: the Flux CLI — from installation and shell completion to essential commands like flux get, flux logs, flux reconcile, and flux trace. See you there!