Skip to content

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), 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 the ControlPlane 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

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

Before uninstalling the Flux Operator, make sure to delete the FluxInstance resources with:

kubectl -n flux-system delete fluxinstances --all

The operator will uninstall Flux from the cluster without affecting the Flux-managed workloads.

Verify that the Flux controllers have been removed:

kubectl -n flux-system get deployments

Uninstall the Flux Operator with your preferred method, e.g. Helm:

helm -n flux-system uninstall flux-operator