Enable GitOps Deployments with FluxCD
Make sure to install:
Devtron supports FluxCD to enable GitOps-based deployments. With FluxCD, you can:
-
Deploy applications via GitOps (via FluxCD).
-
Deploy Helm charts via FluxCD.
-
Migrate existing FluxCD applications into Devtron.
Your Git repository becomes the single source of truth for your Kubernetes workloads. Any changes you make in Git are automatically applied to your Kubernetes cluster by FluxCD. Refer to the FluxCD documentation to learn more.
Installation​
The user must have permissions to:
- Edit the ConfigMaps of 'default-cluster'
- Restart the pods
To enable deployments through GitOps via FluxCD, you need to enable a specific feature flag for the default_cluster in Devtron.
| Feature | Flag | Description |
|---|---|---|
| Deployments via FluxCD | FEATURE_FLUX_DEPLOYMENTS_ENABLE: "true" | This flag will enable deployments through GitOps via FluxCD.
|
| Migrating existing FluxCD applications | FEATURE_LINK_EXTERNAL_FLUX_ENABLE: "true" | This flag will enable migrations for external FluxCD apps into Devtron. |
Application deployments through GitOps (via FluxCD) are supported only when using the Deployment or Rollout deployment strategies with the latest chart versions. Other deployment strategies are currently not supported.
Enabling Feature Flags​
-
Navigate to Devtron's Resource Browser.

-
Select the
default_clusterto enable the feature flags.
-
Go to Config & Storage → ConfigMap, and click
dashboard-cmConfigMap
-
Edit the
dashboard-cmConfigMap by clicking Edit live manifest.
-
To enable deployments via FluxCD, check if the below entries are present in the ConfigMap (create one if it doesn't exist) and select Apply changes.
FEATURE_FLUX_DEPLOYMENTS_ENABLE: "true" -
To enable migration for external FluxCD applications, check if the below entries are present in the ConfigMap (create one if it doesn't exist) and select Apply changes.
FEATURE_LINK_EXTERNAL_FLUX_ENABLE: "true"

-
-
Restart the deployment:
- For OSS Users:
-
Navigate to Devtron's Resource Browser.
-
Select the cluster for which you have enabled the feature flags.
-
Click the Terminal tab.
-
Restart the deployment using the following command:
kubectl rollout restart deployment dashboard -n devtroncd
-
- For Enterprise Users:
-
Go to Resource Browser → (select the cluster in which you have enabled the feature flags) → Workloads → Deployment
-
Click the checkbox next to the
dashboardDeployment workloads and restart them using the⟳button.
-
- For OSS Users:
-
Perform a hard refresh of the browser to clear the cache:
-
Mac: Hold down Cmd and Shift and then press R.
-
Windows/Linux: Hold down Ctrl and then press F5.
-
Installing FluxCD Controller (Only for Deployments)​
After enabling the feature flag for deployments, the next step is to install FluxCD Controller in every cluster (including the default cluster) in which you want to deploy the FluxCD applications.
You can install FluxCD Controller by any of the following ways:
-
Install FluxCD controller via Cluster Terminal (Recommended)
Install FluxCD controller via Cluster Terminal.​
-
Navigate to Devtron's Resource Browser.
-
Select the cluster for which you have enabled the feature flags.
-
Click the Terminal tab.
-
Run the following command to install the FluxCD Controller:
kubectl apply -f https://github.com/fluxcd/flux2/releases/download/v0.35.0/install.yaml
-
After the command is executed successfully, you can deploy or migrate your applications in that cluster through GitOps (via FluxCD).
Install FluxCD controller via Chart Store.​
To install FluxCD controller via Chart Store, follow the below steps.
-
Add FluxCD controller repository,
https://fluxcd-community.github.io/helm-chartsin the chart repositories (if not already added) in Global Configurations. Refer Chart Repositories to learn more.
-
Add a new environment in the cluster in which you want to deploy the application via FluxCD linked to namespace as
flux-system. Refer Clusters and Environments to lean more.
-
Navigate to Chart Store and select the
flux2chart.
-
Click Configure and Deploy.

-
Configure the following configurations:
Field Name Description App Name Define a name for the chart. Project Select a project from the dropdown Deploy to Environment Select the environment which you have created in your preferred cluster linked to flux-systemnamespace.
-
Click Deploy and the chart will be deployed.
After the chart is successfully deployed, you can deploy applications though GitOps (via FluxCD).