Image Automation Controllers
What you'll learn: How Flux automatically detects new container images and updates your Kubernetes deployments without manual intervention.
The Automated Image Update Flow
Imagine you push a new Docker image to your registry with tag v1.2.3. Wouldn't it be great if your cluster automatically detected this new version, updated your Git repository with the new tag, and deployed it—all without you lifting a finger? That's exactly what Flux's Image Automation Controllers do.
The Three-Resource Pattern
Flux uses three custom resources working together like a relay team:
ImageRepository scans your container registry (like Docker Hub, ECR, or GCR) on a schedule, discovering all available image tags. Think of it as a watchdog constantly checking "what's new in the registry?"
ImagePolicy defines rules for selecting which tag to use from all those discovered by ImageRepository. You might say "give me the latest semantic version" or "the newest image matching pattern prod-*". It's your decision-making filter.
ImageUpdateAutomation takes the tag selected by ImagePolicy and automatically commits the change to your Git repository—updating manifests or Helm values files. This closes the GitOps loop: registry → policy decision → Git commit → Flux deploys.
How They Work Together
- ImageRepository polls your registry every few minutes
- ImagePolicy evaluates all tags and selects one based on your rules
- ImageUpdateAutomation detects the policy changed, updates your YAML files in Git, and commits
- Source Controller (which you already know) sees the Git change and triggers reconciliation
This creates a fully automated pipeline from docker push to production deployment, while preserving Git as your source of truth.
Key Takeaway: Flux's Image Automation Controllers (ImageRepository, ImagePolicy, ImageUpdateAutomation) form an automated pipeline that watches container registries, selects appropriate tags, and updates Git repositories—enabling true continuous deployment while maintaining GitOps principles.