Flux CLI
The Flux Command-Line Interface documentation.
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
With winget (only versions after 2.0.0):
winget install -e --id FluxCD.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.
Last modified 2024-09-12: Update CLI windows installation instructions (b54b82d)