Should I Bootstrap Flux with Terraform or the Flux CLI?

0
0
Asked By MellowCedar42 On

I'm setting up Flux on a Kubernetes cluster and am considering a few approaches: Terraform with Helm, the Terraform Flux provider, or running the Flux bootstrap command from a CI runner. I don't ultimately want Terraform to manage Flux after the initial setup. Is there a practical reason to use Terraform for bootstrapping, or is the Flux CLI the simpler and more appropriate choice?

4 Answers

Answered By QuietMaple7 On

If Flux is the only thing you’re bootstrapping and you already have a working CI runner, the Flux CLI is usually the simplest option. Bootstrap is generally a one-time operation, and Flux can then manage its own manifests declaratively through Git. Using Terraform adds another layer unless you already use it to provision the surrounding infrastructure.

Answered By CopperNook31 On

The main reason to use Terraform is repeatability and recovery. Consider whether you can recreate an entire environment with one documented process, including the permissions and secrets needed to run bootstrap. If rebuilding clusters, development environments, or disaster-recovery environments is important, managing the bootstrap declaratively may be worthwhile. Otherwise, the CLI is likely enough.

Answered By LunarPine56 On

Another option is to install the Flux Operator with Helm and define a FluxInstance resource in your infrastructure repository. The operator can then reconcile that instance, which points Flux at the repository containing its configuration. From there, Flux manages its own setup through GitOps, so Terraform doesn’t need to remain involved.

Answered By RiverLoom88 On

Terraform and Flux can work together, especially when Terraform owns the cluster and related cloud resources. It can pass infrastructure values—such as certificate IDs, network information, or security group names—to Kubernetes through seeded secrets or other configuration. That can be useful, but it’s more of an integration pattern than a requirement for bootstrapping Flux.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.