CoursesFluxBeginner

Bootstrapping Flux

Flux manages itself from Git.

Advanced12 min · lesson 2 of 12

Flux installs itself in a very GitOps way: flux bootstrap. Instead of a one-off kubectl apply, bootstrap commits Flux’s own controller manifests into a Git repository and configures Flux to reconcile that path — so Flux is itself managed by Flux, from Git. Upgrades and configuration changes to Flux then happen through commits, like everything else. The bootstrap command takes your Git provider, repo, and a path, and wires up the whole loop.

terminal
$ flux bootstrap github \
--owner=acme --repository=fleet-infra \
--branch=main --path=clusters/prod \
--personal=false --token-auth=false # deploy key, not a PAT, where possible
# commits Flux manifests to clusters/prod and starts reconciling them

Self-managed, and the repo structure

After bootstrap, the repo has a clusters/<name> path holding Flux’s config plus your Kustomization/HelmRelease resources that point at the rest of your infrastructure. A common layout separates infrastructure (ingress, cert-manager), configuration (namespaces, policies), and apps, each a Kustomization with dependencies between them. Because Flux manages itself, you upgrade Flux by bumping its manifests in Git and letting it reconcile the change.

repo layout
clusters/prod/
flux-system/ # Flux’s own manifests (from bootstrap)
infrastructure.yaml # Kustomization -> ./infrastructure
apps.yaml # Kustomization -> ./apps (dependsOn infrastructure)
infrastructure/
apps/
Bootstrap credentials control the cluster’s deploy path
The token or deploy key you give flux bootstrap grants write to the repo Flux reconciles — and write to that repo is deploy access to the cluster. Prefer a scoped deploy key over a broad personal access token, store it securely, and treat the bootstrap repo as production infrastructure with branch protection and reviews. The convenience of self-management means the bootstrap credential and repo are high-value from minute one.