LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

flux-bootstrap

Bootstrap Flux on a Kubernetes cluster using GitOps

TLDR

Bootstrap Flux using a GitHub repository (personal account)
$ flux bootstrap github --owner [username] --repository [repo] --path [clusters/my-cluster] --personal
copy
Bootstrap using GitLab
$ flux bootstrap gitlab --owner [group] --repository [repo] --path [clusters/my-cluster]
copy
Bootstrap from a generic Git repository over SSH
$ flux bootstrap git --url ssh://git@example.com/repo.git --branch main --path ./clusters/my-cluster
copy

SYNOPSIS

flux bootstrap provider [options]

DESCRIPTION

flux bootstrap installs Flux on a Kubernetes cluster by pushing the necessary manifests to a Git repository and configuring the cluster to sync from it. This establishes the GitOps control plane (source-controller, kustomize-controller, helm-controller, notification-controller, etc.).It supports GitHub, GitLab, Gitea, Bitbucket Server, and generic Git repositories. The command creates the `flux-system` namespace, required secrets, and the initial GitRepository + Kustomization that keeps Flux itself up to date.After bootstrap, the cluster is managed declaratively from Git.

PARAMETERS

Common options across providers:--owner name

GitHub/GitLab owner or organization.
--repository name
Name of the repository.
--path path
Path within the repository where manifests live (e.g. `clusters/my-cluster`).
--branch branch
Git branch (default `main`).
--personal
Use a personal access token instead of an organization app.
--private-key-file file
Path to SSH private key.
--components list
Comma-separated list of components to install (default includes source, kustomize, helm, and notification controllers).
--components-extra list
Additional components (e.g. `image-reflector-controller,image-automation-controller`).
--token-auth
Use a personal access token instead of an SSH deploy key.
Other provider-specific options exist (see `flux bootstrap --help`).

INSTALL

sudo apk add flux
copy
brew install flux
copy
nix profile install nixpkgs#flux
copy

CAVEATS

Bootstrap requires a working `kubectl` context with cluster admin permissions and appropriate Git credentials. The repository must already exist (or be created by the command when using supported providers).

SEE ALSO

RESOURCES

Copied to clipboard
Kai