Kubernetes GitOps with Flux

Flux keeps self-managed Kubernetes clusters in sync with Git and automates image updates. This page covers the setup sequence, tenancy and delivery decisions, and how operations differ from Argo CD.

On this page

Kubernetes GitOps with Flux: what it does and when to choose it

If your team runs self-managed Kubernetes clusters and wants Git to be the record of what runs in them, Flux is a pull-based GitOps controller set that keeps clusters in sync with configuration sources such as Git repositories, Helm repositories, OCI artifacts and S3-compatible buckets, and automates updates when new configuration is ready to deploy. Flux is licensed under Apache-2.0 and graduated in the CNCF on November 30, 2022. It is built from the GitOps Toolkit controllers: the source controller fetches artifacts, the kustomize controller and helm controller apply them, the notification controller reports events, and image automation controllers handle image updates. Because the controllers run inside the cluster and pull from the source, no external system needs cluster credentials to push changes.

You can install Flux in three supported ways. flux bootstrap is idempotent, so rerunning it against the same repository reconciles the installation rather than duplicating it. The Flux Terraform provider suits teams that already manage cluster add-ons in Terraform. The Flux Operator provides a declarative API for managing the Flux controllers, which fits teams that want the installation itself in Git. The Flux installation documentation covers air-gapped installation, which matters if your clusters cannot reach public registries or Git hosts. Before you choose, confirm which installation path your platform team can support, which Git host you will bootstrap against (Flux integrates with GitHub, GitLab and Bitbucket), and whether your Kubernetes minor version meets the minimum patch versions listed in the Flux installation guide.

Flux is a good fit when your organization wants Kubernetes RBAC with impersonation to scope what each reconciliation may change, when many teams need separate repositories, or when you want to manage infrastructure and workload dependencies through the same reconciliation model. It is a weaker fit if your team mainly needs a web UI for operators to inspect application state, since Flux is driven through Git and the Kubernetes API. Argo CD is the usual alternative, and its web UI, multi-cluster management and built-in SSO options are different trade-offs. Decide on operating model first, then confirm the choice with a small pilot cluster in your environment before committing repositories and access models.

What a Flux deployment needs before bootstrap

Flux only works once the cluster, the Git source and the network path between them are in place. The cards below cover what to confirm on each side before running bootstrap, so the first reconciliation succeeds and access stays scoped to what Flux needs.

Supported Kubernetes patch versions

The Flux installation guide sets minimum patch levels: 1.34.1 or later for Kubernetes 1.34, 1.35.0 for 1.35, and 1.36.0 for 1.36 and later. Check the exact patch release of every cluster before bootstrap, not just the minor version. The same guide advises against running end-of-life Kubernetes in production, so confirm each cluster's support end date against the Kubernetes release schedule and plan an upgrade before it lapses. Older clusters that fail the check need an upgrade first.

Flux installation guide

End-of-life clusters in production

Flux advises against running end-of-life Kubernetes versions in production. Treat the support window as a gate in the GitOps plan: a cluster that falls out of support can keep running Flux, but its controllers and the platform underneath receive no further fixes. Agree who owns the minor version upgrade calendar, and confirm that Flux itself is upgraded to a release that supports the target Kubernetes version before the cluster moves.

Git host and repository credentials

Flux integrates with GitHub, GitLab and Bitbucket. Decide which host holds the fleet repository and the application repositories, then create a deploy key or a scoped token for each repository Flux will read. Confirm whether the host requires SSH keys, HTTPS tokens or both, and who rotates them. Store the credentials as Kubernetes Secrets in the Flux namespace, never in the repository itself.

Network paths from the cluster

Each cluster needs outbound access to every Git repository Flux syncs, to any Helm repository or OCI registry that holds charts and artifacts, and to any S3-compatible bucket used as a source. Air-gapped sites need an internal Git server or mirror, a private registry and a route for the Flux images themselves. Document each endpoint and port, and test the path from a pod in the Flux namespace, since node firewall rules often differ from what engineers assume.

Bootstrap engineer access

The engineer who runs bootstrap needs cluster-admin rights on the target cluster for the install, plus write access to the fleet repository, since bootstrap commits the Flux manifests to Git. Once Flux runs, day-to-day reconciliation uses its own service accounts, so the human role can narrow. Agree in advance who holds the Git write credentials, how the bootstrap session is logged, and how that access is removed after the first sync.

Flux controllers pull from Git and apply through tenant service accounts

The diagram starts at the Git repositories that hold cluster and application config. The source controller fetches them and hands an artifact to the kustomize controller or helm controller, which apply resources to the cluster API under a tenant service account. The notification controller reports events outward, and image automation writes new image tags back to Git. Check that each tenant's service account carries only the RBAC it needs, because that account is the trust boundary.

Flux controllers pull from Git, apply through tenant accounts and write image updates back.

How to bootstrap Flux and connect the first repository

This sequence takes an empty Kubernetes cluster to a state where Flux reads a Git repository, applies its contents, and reports healthy status, with a second repository added for workloads. The result is a cluster whose desired state is defined in Git and checked by Flux controllers that can be inspected at any step.

  1. Choose the install method and prerequisites

    Your platform team picks how Flux is installed: flux bootstrap from the Flux CLI, the Flux Terraform provider, or the Flux Operator, which exposes a declarative API for the controllers. Confirm that your cluster runs a Kubernetes patch version listed as supported in the Flux installation guide, since the guide advises against end-of-life Kubernetes versions in production. Also decide whether the cluster can reach the internet, because the installation guide covers air-gapped installation and that path needs an internal copy of the Flux images and manifests. This step is done when the method, the Kubernetes version and the network path are written down and checked against the guide.

  2. Bootstrap Flux against the platform repository

    Run flux bootstrap (or apply the equivalent Terraform or Operator configuration) pointing at a dedicated Git repository for cluster configuration, with credentials that Flux can use to read it. Bootstrap installs the GitOps Toolkit controllers, creates a GitRepository and a Kustomization that point back at the same repository, and commits the Flux manifests into that repository. Use a deploy key or a token scoped to that one repository, which fits the least-privilege, pull-based model Flux uses. Bootstrap is idempotent, so rerunning it with the same arguments updates the installation without duplicating objects. This step is done when the controller pods are running in the flux-system namespace.

  3. Confirm the source and kustomization objects reconcile

    Check that the GitRepository object fetches the repository and reports a Ready condition with a recent revision, then check that the Kustomization that applies the path in that repository reports Ready and the revision it applied. Use flux get sources git and flux get kustomizations, or kubectl describe on the objects, and read the status conditions and the last applied revision. If the source is not ready, the most common causes are the credential secret, the branch name or network access to the Git host. This step is done when both objects show Ready and the revision matches the latest commit on the branch.

  4. Add a second repository for workloads

    Create a separate repository for application workloads, with its own GitRepository and Kustomization objects that point to it, so that platform changes and team changes can be reviewed and permissioned apart. Flux supports syncing an arbitrary number of Git repositories, and it can read from GitHub, GitLab and Bitbucket. Put the workload Kustomization under the platform Kustomization's dependency chain if workloads need platform components such as ingress or a CRD first. Decide who can merge to each repository before the second one is connected, because Flux applies whatever is at the head of the branch it tracks. This step is done when the workload objects report Ready and the expected workload resources exist in the cluster.

  5. Verify controller logs and status conditions

    Inspect the logs of the source, kustomize and helm controllers in the flux-system namespace for errors that the status conditions do not show, such as failed server-side apply or missing CRDs. Run flux check to confirm the installed components and the Kubernetes version compatibility. Make a deliberate, harmless change in the workload repository, such as a label on a test resource, and confirm that Flux picks up the new commit and reports the new revision. This step is done when the controllers log no repeated reconciliation errors and a test commit reaches the cluster and appears in the status conditions.

  6. Record the bootstrap state for recovery

    Save the bootstrap arguments, the repository names, the deploy key or token owner and the namespace layout in your operations runbook, and confirm who holds the Git credentials. Because Flux state lives in Git and in the cluster objects, a rebuilt cluster can be bootstrapped again against the same repositories, which is why the repository and credential ownership matter as much as the cluster itself. Ask your DeployOpen or internal team to confirm how the bootstrap runs in your own environment, including any air-gapped mirrors. This step is done when a second engineer can follow the runbook to bootstrap a test cluster from the same repositories.

Multi-tenancy across many repositories: choosing the tenant model

In this model, one Git repository holds the desired state for every team, with a directory per team or application. Flux reconciles the repository through a small number of Kustomizations, and the platform team controls the top-level layout. It is the simplest model to start with because there is one place to review, one branch protection policy and one source to monitor.

The trade-off is that access control becomes a path-based problem. Git permissions usually apply to the whole repository, so teams that can merge to the repo can also affect shared paths unless you add code owners rules, path-based review requirements or a separate pull request policy. Changes from one team can also block another team's rollout when they share a Kustomization.

  • Review scope: a single repo gives one audit trail, but reviewers must understand every team's directories.
  • Blast radius: a bad manifest in a shared Kustomization can stall reconciliation for several teams.
  • Ownership files: code owners and required reviewers per directory are the main control; confirm your Git host supports path-level rules.
  • Growth: the repo grows with every team, which raises review load and merge conflicts.
  • Onboarding: adding a team is a directory and a Kustomization, which is quick but still needs a platform review.

Before you commit, check that your Git platform can enforce path-level approvals and that each team's Kustomization is separate enough to fail independently.

Image update automation and Flagger canaries in Flux

Image update automation lets Flux close the loop between a new container build and a running workload, but it also means a registry push can change production without a person reviewing a Git diff. Before you enable it, decide which image repositories and tag patterns it may follow. The image reflector controller scans the registry for tags matching an ImagePolicy, the image update automation controller then writes the selected tag into the manifest in Git and commits it, and the normal Kustomize or Helm controller reconciles that commit like any other change. Keep the policy narrow, such as a semver range or a dedicated release branch tag pattern, and confirm that the commit author, branch and signing identity are ones your change-management process accepts. Confirm the exact field names and controller versions against the Flux documentation for your release, since the image automation API evolves.

Flagger sits on top of this pipeline and turns a plain Deployment update into a progressive rollout. A Canary resource references the target workload and a service, shifts traffic in steps, and promotes or rolls back based on metrics and webhooks. It also supports A/B-style header or cookie matching and can gate promotion on checks you define. Flux can manage any Kubernetes resource, so the Canary, the metrics provider, the ingress or Gateway API objects and the monitoring stack that Flagger depends on can all live in the same Git repositories, reconciled in a fixed order through dependsOn. Treat those infrastructure dependencies as part of the release: if Prometheus or the traffic provider is missing, the canary can stall or misjudge health.

Design the gates and rollback criteria before you turn automation on, not after the first bad release. Write down the success thresholds Flagger will check, such as request success rate and latency limits, the duration of each traffic step, and which webhook approvals a human must give. Decide who can suspend a Kustomization or pause a canary, and how a rollback is recorded in Git so the next reconcile does not reapply the failed tag. Rehearse the failure path in a non-production cluster, including a broken image and a metrics outage, and confirm the rollback behavior your team observes matches the design. Automation that promotes without these criteria is faster, but it is not yet a controlled release.

How Flux differs operationally from Argo CD

This table compares how Flux and Argo CD behave day to day, from the user interface and SSO to where state lives and how access is granted. Read each row as a question to verify against the current documentation for each project before you choose. The main takeaway is that the difference is mostly in operating model and access design, so the choice should follow your team's workflow and access requirements.

AreaFluxArgo CD
Operating modelSet of controllers (source, kustomize, helm, notification, image automation) reconciling Git-sourced objects, with no required web UIController with a bundled web UI and CLI for viewing and acting on applications
Multi-cluster managementTypically one Flux installation per cluster, with Git repositories driving each cluster; confirm the multi-cluster pattern you plan to useManages multiple clusters from a central instance; confirm cluster registration and sharding behavior for your version
SSO and loginRelies mainly on Kubernetes and Git platform access; the UI and SSO model depend on the tooling you add, so confirm itBundled Dex with SAML, LDAP and GitHub connectors, or direct OIDC with providers such as Okta, Keycloak or Microsoft
RBAC modelKubernetes RBAC with impersonation per tenant, so each reconciliation runs as a service account you scopeArgo CD RBAC policies inside the project, with update and delete rights applying to the application itself in 3.0 and later
Where state livesDesired state in Git, live state in Kubernetes objects managed by the controllersApplication state kept in Kubernetes objects, with Redis as a disposable cache
High availability and scalingScale by running controllers and separating tenants by namespace and repository; confirm sizing for your cluster countHA manifests need at least three nodes for pod anti-affinity; the application controller can be sharded across replicas
Progressive deliveryPairs with Flagger for canary and A/B rollouts; confirm the Flagger version supported with your Flux releaseRollouts are handled through Argo Rollouts, a separate project; confirm its fit with your delivery workflow
Feature parityVerify current features in the Flux documentation before assuming any capability existsVerify current features in the Argo CD documentation before assuming any capability exists

Securing the Flux pipeline: credentials, RBAC and least privilege

A Flux pipeline holds keys to Git, to container registries and to the cluster itself, so each credential needs an owner, a scope and a rotation path. The cards below cover where those credentials live, how each tenant is confined, and which Kubernetes controls still matter once Flux reconciles the desired state.

Git deploy keys and tokens

Flux reads configuration from Git using either an SSH deploy key or an HTTPS token, and the choice sets how much a leaked credential can reach. Prefer read-only deploy keys scoped to a single repository for sync, and use a separate, narrowly scoped token for image automation that must write back to Git. Record who created each credential, where it is stored, and how it is rotated, and confirm with your Git host which permissions each token type carries.

Flux docs

Least-privilege service accounts per tenant

Flux's multi-tenancy model runs each Kustomization or HelmRelease under a service account that impersonates a tenant identity, so one team's sync cannot write into another team's namespace. Create one service account per tenant, bind it only to that tenant's namespaces, and avoid pointing tenant objects at cluster-admin. Test the boundary by attempting a cross-namespace apply from a tenant repository and confirming that it is rejected.

Pull-based design limits exposure

In a pull-based model the agent inside the cluster fetches from Git, so the cluster does not need inbound credentials from CI systems or external deployers. Cluster credentials stay inside the cluster, and Git holds only desired state and the repository credentials Flux uses to read it. Review which controllers have outbound network access, and confirm which external endpoints the source and image controllers must reach in your environment.

Commit and artifact verification

Flux can be configured to check signatures on Git commits and OCI artifacts before reconciling them, which blocks changes that were not signed by an approved key. Signing adds key management work, including who holds signing keys, how they rotate, and what happens when a developer leaves. Confirm the verification options your Flux version supports and the signing tools your teams already use before making verification a release gate.

Keep secrets out of Git

Plaintext Secrets committed to Git stay in history even after deletion, and every clone becomes a copy. Store only references in Git and deliver values from an external store, or encrypt values before commit with a tool whose key the cluster can use. The Secrets Store CSI Driver and External Secrets Operator are sibling topics on this site. Confirm with your security team which option matches your key management and audit requirements.

Encryption at rest and restricted reads

Kubernetes Secrets are stored unencrypted in etcd by default, so anyone who can read the etcd data directory or a backup can read every Secret. Configure encryption at rest for Secret resources, then restrict list and watch verbs in RBAC, because list and watch return full Secret contents. Flux's own controller service accounts should hold only the verbs they need, and you should audit those bindings after each Flux upgrade.

Secrets good practices

Common Flux failures: causes and fixes

This table lists the failures teams most often hit when running Flux, with the likely cause and the first fix to try for each. Read it as a triage order: check the resource status and controller logs first, then match the symptom to the row. Most failures trace back to credentials, dependency order, chart inputs or RBAC rather than to Flux itself.

FailureLikely causeFix
Source not readyThe GitRepository cannot authenticate to Git, or the cluster has no network egress to the Git host, so the source controller cannot fetch revisions.Check the source status message, confirm the secret referenced by the source holds valid credentials, and test egress from the source-controller pod to the Git host.
Kustomization stuck on dependenciesA dependsOn entry points at a Kustomization that is not ready, is misnamed, or sits in another namespace the reference does not cover.Inspect the dependency first, fix its own failure, and confirm dependsOn names and namespaces match exactly. Avoid circular dependencies between Kustomizations.
Helm release failing on chart or valuesThe chart version does not exist in the Helm repository, values fail schema validation, or a template renders invalid manifests.Read the HelmRelease conditions and helm-controller logs, render the chart locally with the same values, and pin the chart version explicitly.
Image automation not committingThe Git credentials used by the image automation controller lack write permission to the branch, or the push is blocked by branch protection.Grant the deploy identity write access to the target branch, or push to a dedicated branch, and confirm the ImageUpdateAutomation commit settings and push target.
Tenant reconcile failing on impersonationThe tenant's service account lacks RBAC rights for the resources in its Kustomization, or the impersonated account is not bound to the namespace.Bind the tenant service account to a role covering the resource kinds it deploys, scope bindings to the tenant namespace, and test with impersonation before merging.
Version skew after Kubernetes upgradeThe cluster moved to a Kubernetes minor or patch version below the minimum Flux supports, so controllers hit API or behavior gaps.Confirm the Flux minimum patch for your Kubernetes minor in the installation guide, upgrade the Kubernetes patch first, then upgrade Flux in a staging cluster before production.

Questions buyers ask before running Flux with a partner

What drives the cost of a Flux GitOps engagement?

The main drivers are the number of Git repositories Flux must sync, the tenancy model you choose, the number of clusters, whether the install must run air-gapped, and how far progressive delivery with Flagger goes. Each repository adds source, reconciliation and access design. Each tenant needs RBAC with impersonation scoped to its namespaces and repositories. Each cluster repeats bootstrap and drift checks. An air-gapped install adds mirroring of controller images and chart sources. Flagger adds canary analysis and rollback rules for every workload that uses it. Engagements are fixed-scope, so ask for a written quote that lists each of these items, the one-time build work and any recurring support or upgrade retainer separately.

How long does a Flux GitOps rollout take?

Duration depends on the same drivers as cost: repository count, tenancy design, cluster count, network restrictions and how many applications move to Flagger-based rollouts. A single cluster with one repository and a simple tenancy model is a much smaller piece of work than a multi-cluster platform serving several teams from many repositories. Approval cycles on your side, such as security review of the Git provider integration and change board sign-off, often set the pace more than the technical build. Ask the partner for a timeline tied to the agreed scope and to your approval calendar, and check which milestones depend on your access being ready.

What does our team need to provide before work starts?

Plan for four groups of input. First, Git access: admin or maintainer rights on the repositories Flux will read, and a decision on how credentials are issued. Flux integrates with GitHub, GitLab and Bitbucket and uses a pull-based design with least-privilege access, so the repository permissions should be read-focused. Second, cluster admin: a named owner who can bootstrap Flux and approve cluster-scoped resources. Third, approvers: people who sign off on tenant boundaries, image update policies and Flagger rollback thresholds. Fourth, environment details: registry locations, chart mirrors for air-gapped sites, and the Kubernetes minor versions in use. Confirm the minimum Kubernetes patch versions in the Flux installation guide before you commit to a version.

Can our own platform team run Flux after the engagement?

Often yes, if the team already operates Kubernetes and Git-based workflows and the design is documented. Flux is built from GitOps Toolkit controllers, including the source controller, kustomize controller, helm controller and notification controller, and each has a defined job you can learn in pieces. Operational work that recurs includes reviewing reconciliation failures, rotating Git credentials, upgrading Flux and keeping Kubernetes versions supported. Flux bootstrap is idempotent, which simplifies repeat installs. Ask for runbooks covering tenant onboarding, image automation changes and rollback. If your team lacks capacity for upgrades, a support retainer can cover that work while your staff keep ownership of the repositories.

How does Flux differ from Argo CD in day-to-day operations?

Both tools reconcile clusters from Git, but they differ in how you operate them. Argo CD runs as a Kubernetes controller with a web UI, manages multiple clusters, and integrates SSO over OIDC, OAuth2, LDAP and SAML 2.0 with its own RBAC. Flux is built on the Kubernetes API extension system, has no bundled UI in its core design, and supports multi-tenancy through Kubernetes RBAC with impersonation across an arbitrary number of Git repositories. Flux also covers image update automation and works with Flagger for progressive delivery. Choose based on whether your teams want a central UI and project model (Argo CD) or Kubernetes-native controllers and RBAC-driven tenancy (Flux). The Flux documentation is the natural next read for the controller model.

What security checks matter before giving Flux access to Git and clusters?

Review three areas. Git credentials: Flux pulls from repositories, so decide who can merge to the branches it watches, since that controls what reaches production. Cluster privileges: confirm which service accounts Flux uses and how impersonation limits them per tenant. Image automation: if image update controllers can write to Git, restrict the write scope and require review for those commits. Flagger adds rollback thresholds that should be approved by the owning team. Also confirm how secrets are delivered to workloads, because Kubernetes stores Secrets unencrypted in etcd by default unless encryption at rest is configured. Ask the partner to show the RBAC bindings and branch protection rules as part of the design review.

Does the engagement include upgrades and continuous support?

Engagements are fixed-scope, so upgrades, testing and documentation are included only where the written scope lists them. Kubernetes itself releases about three times per year, and the project maintains only its three most recent minor releases, so the Flux version and the cluster version both need a plan. Ask whether the scope covers upgrading Flux, aligning it with supported Kubernetes patch versions and testing before each change. For ongoing work, DeployOpen offers retainers for support, upgrades and continuous testing. Ask for the response expectations in writing, since DeployOpen does not publish a standard SLA for this page.

How the Flux engagement is scoped in writing

DeployOpen agrees scope, deliverables and timelines in writing before work starts, and a quote follows from that written scope rather than being estimated from a headline platform description. For a Flux engagement, the written scope should list every cluster that Flux will reconcile, with its Kubernetes version, control plane topology and whether it has internet access, since those facts decide how Flux is installed (through flux bootstrap, the Flux Terraform provider or the Flux Operator) and whether air-gapped installation steps apply. It should also name each Git repository and OCI or Helm source, the branch or tag policy for each, and which controllers (source, kustomize, helm, notification and image automation) are in use. Pricing and duration depend on these counts far more than on the Flux version itself.

The scope should then name the tenants and the workloads they own. For each tenant, list the namespaces, the service account Flux impersonates for that tenant's reconciliations, the repositories it may write to, and the image update targets that Flux may change automatically, including the registry, the tag filter and the write-back path into Git. List the Flagger workloads separately, with the canary analysis metrics, the rollout steps and the rollback conditions agreed with the application owners, because each one adds design and test work. Ask whether the written scope also covers the notification and alerting path and the Prometheus integration, since those are often missed in early quotes.

Ask for the retainer terms in the same document. A retainer covers Flux and Kubernetes upgrades, controller version updates, continuous support and periodic review of the repository layout and access model. Confirm in writing who performs each recurring task, how upgrades are timed against the Kubernetes release schedule and the minimum supported Kubernetes patch versions in the Flux installation guide, and what happens when a Flux or Kubernetes release falls outside the agreed window. Those answers determine what recurs after the initial build and should be visible in the quote.

How DeployOpen delivers Flux GitOps in your infrastructure

DeployOpen plans, builds, hands over and supports Flux inside your own cloud accounts, data centers or air-gapped networks. Each engagement starts from a written scope that defines which clusters, repositories, tenants and delivery paths Flux will manage, so your platform and security teams know what they are approving before any work begins.

How we scope

  • Inventory the clusters, Git hosts and Helm or OCI sources Flux will read from, and who owns each repository
  • Define tenant boundaries, service account impersonation and which namespaces each team may reconcile
  • Agree in writing whether image update automation and Flagger progressive delivery are in or out of scope

How we build

  • Bootstrap Flux with flux bootstrap or the chosen installation path, including an air-gapped option where the network requires it
  • Structure source, Kustomize and Helm resources across repositories, then test reconciliation and drift correction
  • Configure notifications, image automation and Flagger canaries only where the approved scope calls for them

How we hand over

  • Document repository layout, reconciliation intervals, tenant RBAC, secret handling and the upgrade order for Flux and Kubernetes
  • Run a walkthrough with your platform engineers covering failed reconciliations, suspended resources and rollback steps
  • Deliver written runbooks and a retest of access controls so your team can operate the setup without us

How we support

  • Support Flux and Kubernetes upgrades against the minimum patch versions in the Flux installation guide
  • Review repository permissions, tenant access and controller configuration on a schedule agreed in the retainer
  • Ongoing support, upgrades and continuous testing are available as retainers, priced from the written scope

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.