You are viewing documentation for Flux version: 2.0
Version 2.0 of the documentation is no longer actively maintained. The site that you are currently viewing is an archived snapshot. For up-to-date documentation, see the latest version.
Flux CLI
The Flux CLI is available as a binary executable for all major platforms, the binaries can be downloaded from GitHub releases page.
Install using package management
With Homebrew:
brew install fluxcd/tap/flux
With Chocolatey:
choco install flux
Install using Bash
To install the latest release on Linux, macOS or Windows WSL:
curl -s https://fluxcd.io/install.sh | sudo FLUX_VERSION=2.0.0 bash
The install script does the following:
- attempts to detect your OS
- downloads, verifies and unpacks the release tar file in a temporary directory
- copies the
flux
binary to/usr/local/bin
- removes the temporary directory
Install using Docker
A container image with kubectl
and flux
is available on DockerHub and GitHub:
docker.io/fluxcd/flux-cli:<version>
ghcr.io/fluxcd/flux-cli:<version>
Example usage:
$ docker run -it --entrypoint=sh -v ~/.kube/config:/kubeconfig ghcr.io/fluxcd/flux-cli:v2.0.0
/ # flux check --kubeconfig=kubeconfig
Enable shell autocompletion
To configure your shell to load flux
bash completions add to your profile:
. <(flux completion bash)
zsh
,
fish
,
and
powershell
are also supported with their own sub-commands.
Install using GitHub Actions
To install the latest release on Linux, macOS or Windows GitHub runners:
steps:
- name: Setup Flux CLI
uses: fluxcd/flux2/action@main
with:
version: 'latest'
- name: Run Flux CLI
run: flux version --client
For more information please see the Flux GitHub Action documentation.