These are some core concepts in Flux.
GitOps is a way of managing your infrastructure and applications so that whole system is described declaratively and version controlled (most likely in a Git repository), and having an automated process that ensures that the deployed environment matches the state specified in a repository.
For more information, take a look at the following resources:
GitOps Toolkit (gotk)
In Flux, GitOps Toolkit refers to a collection of specialized tools, Flux Controllers, composable APIs, and reusable Go packages available under the fluxcd GitHub organization. These components are designed for the purpose of constructing Continuous Delivery workflows on Kubernetes using GitOps principles. The GitOps Toolkit serves as the foundation for managing and automating the deployment and configuration of applications and infrastructure within a Kubernetes cluster, promoting a declarative and version-controlled approach to operations.
For more information, take a look at GitOps Toolkit components
A Source defines the origin of a repository containing the desired state of
the system and the requirements to obtain it (e.g. credentials, version selectors).
For example, the latest
1.x tag available from a Git repository over SSH.
Sources produce an artifact that is consumed by other Flux components to perform actions, like applying the contents of the artifact on the cluster. A source may be shared by multiple consumers to deduplicate configuration and/or storage.
The origin of the source is checked for changes on a defined interval, if there is a newer version available that matches the criteria, a new artifact is produced.
All sources are specified as Custom Resources in a Kubernetes cluster, examples
of sources are
For more information, take a look at the source controller documentation.
Reconciliation refers to ensuring that a given state (e.g. application running in the cluster, infrastructure) matches a desired state declaratively defined somewhere (e.g. a Git repository).
There are various examples of these in Flux:
HelmReleasereconciliation: ensures the state of the Helm release matches what is defined in the resource, performs a release if this is not the case (including revision changes of a HelmChart resource).
Bucketreconciliation: downloads and archives the contents of the declared bucket on a given interval and stores this as an artifact, records the observed revision of the artifact and the artifact itself in the status of resource.
Kustomizationreconciliation: ensures the state of the application deployed on a cluster matches the resources defined in a Git or OCI repository or S3 bucket.
Kustomization custom resource represents a local set of Kubernetes resources
(e.g. kustomize overlay) that Flux is supposed to reconcile in the cluster.
The reconciliation runs every five minutes by default, but this can be changed with
If you make any changes to the cluster using
they will be promptly reverted. You either suspend the reconciliation or push your changes to a Git repository.
The process of installing the Flux components in a GitOps manner is called a bootstrap.
The manifests are applied to the cluster, a
are created for the Flux components, then the manifests are pushed to an existing Git repository
(or a new one is created). Flux can manage itself just as it manages other resources.
The bootstrap is done using the
flux CLI or
For more information, take a look at the bootstrap documentation.
Continuous Delivery refers to the practice of delivering software updates frequently and reliably.
For more information, take a look at continuous delivery as defined in the CNCF.
Continuous Deployment is the practice of automatically deploying code changes to production once they have passed through automated testing.
For more information, take a look at continuous delivery as defined in the CNCF Glossary.
Progressive Delivery builds on Continuous Delivery by gradually rolling out new features or updates to a subset of users, allowing developers to test and monitor the new features in a controlled environment and make necessary adjustments before releasing them to everyone.
Developers can use techniques like feature flags, canary releases, and A/B testing to minimize the chances of introducing bugs or errors that could harm users or interrupt business operations. These strategies enable a controlled and gradual rollout of new features, ensuring a smooth and successful release that enhances user trust and improves the overall user experience.