Course contentsShow
← Cloud and Infrastructure
Lesson 1925 of 2,98941. FluxFree lesson

Managing Applications with Flux

Deploy and manage applications declaratively by committing manifests to Git and letting Flux reconcile.

Managing Applications with Flux

You'll learn: How to deploy and manage Kubernetes applications by committing manifests to Git and letting Flux automatically reconcile them to your cluster.

The GitOps Application Management Flow

With Flux's Source and Kustomize Controllers in place, you're ready to manage actual applications. Instead of running kubectl apply manually, you commit application manifests (Deployments, Services, ConfigMaps) to your Git repository. Flux watches that repo and automatically applies changes to your cluster—making Git your control plane.

Think of it like a thermostat: you set the desired temperature (commit manifests), and the system continuously adjusts (Flux reconciles) until reality matches your setting.

How It Works

You create a Kustomization resource pointing to a directory in your Git repo containing application manifests. The Kustomization tells Flux:

  • Where to find the manifests (path in the GitRepository source)
  • How often to check for changes (interval)
  • What namespace to deploy into

When you commit a new Deployment or update an image tag in Git, Flux detects the change within the reconciliation interval and applies it. If someone manually changes the cluster (like scaling a deployment via kubectl), Flux will revert it back to match Git—ensuring drift correction.

Example Workflow

  1. Commit deployment.yaml and service.yaml to ./apps/myapp/ in your Git repo
  2. Create a Kustomization pointing to that path
  3. Flux reconciles: reads manifests, applies them to the cluster
  4. Update the image tag in deployment.yaml, commit, push
  5. Flux detects the change and rolls out the update automatically

Key Takeaway: Managing applications with Flux means treating Git as the single source of truth—commit manifests to trigger deployments, and Flux ensures your cluster continuously matches the desired state declared in Git.