Skip to content

Commit f20bb3a

Browse files
authored
Merge pull request #2245 from fluxcd/backport-2244-to-v2-6
[v2-6] Add Flux Operator as an alternative bootstrap method
2 parents 712bf85 + e4cdb34 commit f20bb3a

File tree

1 file changed

+88
-11
lines changed

1 file changed

+88
-11
lines changed

content/en/flux/installation/_index.md

Lines changed: 88 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ The Kubernetes cluster should match one of the following versions:
2121

2222
| Kubernetes version | Minimum required |
2323
|--------------------|------------------|
24-
| `v1.29` | `>= 1.29.0` |
2524
| `v1.30` | `>= 1.30.0` |
26-
| `v1.31` and later | `>= 1.31.0` |
25+
| `v1.31` | `>= 1.31.0` |
26+
| `v1.32` and later | `>= 1.32.0` |
2727

2828
{{% alert color="info" title="Kubernetes EOL" %}}
29-
Note that Flux may work on older versions of Kubernetes e.g. 1.25,
29+
Note that Flux may work on older versions of Kubernetes e.g. 1.29,
3030
but we don't recommend running [EOL versions](https://endoflife.date/kubernetes)
3131
in production nor do we offer support for these versions.
3232
{{% /alert %}}
@@ -157,16 +157,93 @@ The provider offers a Terraform resource called
157157
[flux_bootstrap_git](https://registry.terraform.io/providers/fluxcd/flux/latest/docs/resources/bootstrap_git)
158158
that can be used to bootstrap Flux in the same way the Flux CLI does it.
159159

160-
There are examples available for the provider in the [fluxcd/terraform-provider-flux](https://github.com/fluxcd/terraform-provider-flux) repository, some you may be interested in are:
160+
Check out the examples available for the provider in the
161+
[fluxcd/terraform-provider-flux](https://github.com/fluxcd/terraform-provider-flux) repository.
161162

162-
- [Bootstrapping a cluster using a GitHub repository and a personal access token (PAT)](https://github.com/fluxcd/terraform-provider-flux/tree/main/examples/github-via-pat)
163-
- [Bootstrapping a cluster using a GitHub repository via SSH](https://github.com/fluxcd/terraform-provider-flux/tree/main/examples/github-via-ssh)
164-
- [Bootstrapping a cluster using a GitHub repository via SSH and GPG](https://github.com/fluxcd/terraform-provider-flux/tree/main/examples/github-via-ssh-with-gpg)
165-
- [Bootstrapping a cluster using a GitHub repository self-managing the SSH keypair secret)](https://github.com/fluxcd/terraform-provider-flux/tree/main/examples/github-self-managed-ssh-keypair)
166-
- [Bootstrapping a cluster using a Gitlab repository via SSH](https://github.com/fluxcd/terraform-provider-flux/tree/main/examples/gitlab-via-ssh)
163+
### Bootstrap with Flux Operator
167164

168-
For more details on how to use the Terraform provider
169-
please see the [Flux docs on registry.terraform.io](https://registry.terraform.io/providers/fluxcd/flux/latest/docs).
165+
The [Flux Operator](https://github.com/controlplaneio-fluxcd/flux-operator) is an open-source project
166+
part of the [Flux ecosystem](/ecosystem/#flux-extensions) that provides a declarative API for the
167+
lifecycle management of the Flux controllers.
168+
169+
The operator offers an alternative to the Flux CLI bootstrap procedure, with the option to configure the
170+
reconciliation of the cluster state from Git repositories, OCI Artifacts, or S3-compatible storage.
171+
172+
#### Install the Flux Operator
173+
174+
Install the Flux Operator in the `flux-system` namespace, for example, using Helm:
175+
176+
```shell
177+
helm install flux-operator oci://ghcr.io/controlplaneio-fluxcd/charts/flux-operator \
178+
--namespace flux-system \
179+
--create-namespace
180+
```
181+
182+
The Flux Operator can be installed using Helm, Terraform, OpenTofu, OperatorHub, and other methods.
183+
For more information, refer to the [installation guide](https://fluxcd.control-plane.io/operator/install/).
184+
185+
#### Configure the Flux Instance
186+
187+
Create a [FluxInstance](https://fluxcd.control-plane.io/operator/fluxinstance/) resource
188+
named `flux` in the `flux-system` namespace to install the latest Flux stable version and configure the
189+
Flux controllers to sync the cluster state from an OCI artifact stored in GitHub Container Registry:
190+
191+
```yaml
192+
apiVersion: fluxcd.controlplane.io/v1
193+
kind: FluxInstance
194+
metadata:
195+
name: flux
196+
namespace: flux-system
197+
annotations:
198+
fluxcd.controlplane.io/reconcileEvery: "1h"
199+
fluxcd.controlplane.io/reconcileTimeout: "5m"
200+
spec:
201+
distribution:
202+
version: "2.x"
203+
registry: "ghcr.io/fluxcd"
204+
artifact: "oci://ghcr.io/controlplaneio-fluxcd/flux-operator-manifests"
205+
components:
206+
- source-controller
207+
- kustomize-controller
208+
- helm-controller
209+
- notification-controller
210+
- image-reflector-controller
211+
- image-automation-controller
212+
cluster:
213+
type: kubernetes
214+
multitenant: false
215+
networkPolicy: true
216+
domain: "cluster.local"
217+
kustomize:
218+
patches:
219+
- target:
220+
kind: Deployment
221+
name: "(kustomize-controller|helm-controller)"
222+
patch: |
223+
- op: add
224+
path: /spec/template/spec/containers/0/args/-
225+
value: --concurrent=10
226+
- op: add
227+
path: /spec/template/spec/containers/0/args/-
228+
value: --requeue-dependency=5s
229+
sync:
230+
kind: OCIRepository
231+
url: "oci://ghcr.io/my-org/my-fleet-manifests"
232+
ref: "latest"
233+
path: "clusters/my-cluster"
234+
pullSecret: "ghcr-auth"
235+
```
236+
237+
> For more information on how to configure syncing from Git repositories,
238+
> container registries, and S3-compatible storage, refer to the
239+
> [cluster sync guide](https://fluxcd.control-plane.io/operator/flux-sync/).
240+
241+
The operator can automatically upgrade the Flux controllers and their CRDs when a new version is available.
242+
To restrict the upgrade to patch versions only, set the `distribution.version` field to e.g. `2.6.x`
243+
or to a fixed version e.g. `2.6.0` to disable automatic upgrades.
244+
245+
The Flux Operator can take over the management of existing installations from the Flux CLI or other tools.
246+
For a step-by-step guide, refer to the [Flux Operator migration guide](https://fluxcd.control-plane.io/operator/).
170247

171248
### Dev install
172249

0 commit comments

Comments
 (0)