Flux Operator Installation
The Flux Operator is designed to run in a Kubernetes cluster on Linux nodes (AMD64 or ARM64) and is compatible with all major Kubernetes distributions. The operator is written in Go and statically compiled as a single binary with no external dependencies.
Install methods
The Flux Operator can be installed with Helm, Terraform, Operator Lifecycle Manager (OLM),
the flux-operator CLI, or kubectl.
It is recommended to install the operator in a dedicated namespace, such as flux-system.
Helm
The Flux Operator can be installed using the Helm chart available in GitHub Container Registry:
helm install flux-operator oci://ghcr.io/controlplaneio-fluxcd/charts/flux-operator \
--namespace flux-system \
--create-namespace
Terraform
Installing the Flux Operator with Terraform is possible using the Helm provider:
resource "helm_release" "flux_operator" {
name = "flux-operator"
namespace = "flux-system"
repository = "oci://ghcr.io/controlplaneio-fluxcd/charts"
chart = "flux-operator"
create_namespace = true
}
resource "helm_release" "flux_instance" {
depends_on = [helm_release.flux_operator]
name = "flux"
namespace = "flux-system"
repository = "oci://ghcr.io/controlplaneio-fluxcd/charts"
chart = "flux-instance"
values = [
file("values/components.yaml")
]
}
For more information of how to configure the Flux instance with Terraform, see the Flux Operator terraform module example.
Operator Lifecycle Manager
The Flux Operator can be installed on OpenShift using the bundle published on OperatorHub at operatorhub.io/operator/flux-operator.
Example subscription manifest:
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: flux-operator
namespace: flux-system
spec:
channel: stable
name: flux-operator
source: operatorhubio-catalog
sourceNamespace: olm
config:
env:
- name: DEFAULT_SERVICE_ACCOUNT
value: "flux-operator"
- name: REPORTING_INTERVAL
value: "30s"
The Flux Operator is also available in the OpenShift and OKD production-ready catalog.
Flux Operator supports various environment variables to customize its behavior on OpenShift. Please see the operator configuration guide for more details.
Flux Operator CLI
The Flux Operator can be installed using the flux-operator CLI, which bootstraps a Kubernetes cluster with the Flux Operator and a Flux instance.
Install the CLI with Homebrew:
brew install controlplaneio-fluxcd/tap/flux-operator
Install the Flux Operator and a Flux instance from a configuration file:
flux-operator install -f flux-instance.yaml
Kubectl
The Flux Operator can be installed with kubectl by
applying the Kubernetes manifests published on the releases page:
kubectl apply -f https://github.com/controlplaneio-fluxcd/flux-operator/releases/latest/download/install.yaml
Uninstall
The recommended way to uninstall the Flux Operator and Flux instance is using the flux-operator CLI:
flux-operator -n flux-system uninstall --keep-namespace
The uninstall command safely removes the Flux Operator and Flux controllers
without affecting the Kubernetes objects or Helm releases reconciled by Flux.
It is safe to re-install the Flux Operator later to resume managing the existing resources.
Alternatively, you can uninstall manually by first deleting the FluxInstance resources:
kubectl -n flux-system delete fluxinstances --all
The operator will uninstall Flux from the cluster without affecting the Flux-managed workloads.
Then uninstall the Flux Operator with your preferred method, e.g. Helm:
helm -n flux-system uninstall flux-operator