Flux System Overview
All Flux components run in theflux-system namespace and are installed via the gotk-components.yaml manifest generated during bootstrap.
Core Controllers
source-controller
The source-controller is responsible for acquiring artifacts from external sources and making them available to other Flux components.- Purpose
- Custom Resources
- Configuration
Primary Role: Fetch and cache artifacts from various sources
- Monitors Git repositories for changes
- Manages Helm chart repositories
- Handles S3/OCI buckets
- Creates and maintains artifact archives
- Provides HTTP endpoints for artifact access
The source-controller is the foundation of Flux - without it, no other controller can access your configurations.
kustomize-controller
The kustomize-controller applies Kustomize configurations to the cluster, processing overlays and patches to produce final manifests.Reconciliation
Continuously reconciles Kustomization resources, ensuring cluster state matches Git
Build Process
Processes Kustomize overlays, applying patches and generating final manifests
Health Checks
Monitors deployed resources for health and readiness
Pruning
Removes resources that are no longer defined in Git when
prune: trueKustomization Resource Example
Kustomization Resource Example
The primary Kustomization that Flux reconciles:Key fields:
- interval: How often to reconcile (10 minutes)
- path: Directory in Git to process
- prune: Delete resources not in Git
- sourceRef: Which GitRepository to use
Dependency Management
Dependency Management
Kustomizations can depend on other Kustomizations:This ensures infrastructure is deployed after metallb is ready.
Permissions
Permissions
The kustomize-controller runs with ClusterAdmin privileges via the
cluster-reconciler-flux-system ClusterRoleBinding:This broad permission is required to manage any resource type in the cluster. Consider using more restrictive RBAC for production environments if needed.
helm-controller
The helm-controller automates Helm chart deployments, managing the full lifecycle of Helm releases.- HelmRepository
- HelmRelease
- Benefits
Defines where to fetch Helm charts:The source-controller fetches the chart index every 24 hours.
notification-controller
The notification-controller handles events and alerts, enabling integration with external systems.Event Handling
Event Handling
The controller processes events from other Flux components and can:
- Send notifications to Slack, Discord, Microsoft Teams
- Trigger webhooks for CI/CD integration
- Update commit statuses on Git providers
- Forward events to external monitoring systems
Provider Configuration
Provider Configuration
Example notification provider:And corresponding alert:
Webhook Receivers
Webhook Receivers
The notification-controller can receive webhooks from Git providers to trigger immediate reconciliation:This enables instant deployments instead of waiting for the polling interval.
image-reflector-controller
The image-reflector-controller scans container registries for new image versions.This controller enables automated image updates - when a new container image is published, Flux can automatically update your manifests and deploy the new version.
- ImageRepository - Defines which container registry to scan
- ImagePolicy - Defines rules for selecting image versions (e.g., semver ranges)
image-automation-controller
The image-automation-controller automatically updates Git repositories when new images are detected. Workflow:- image-reflector-controller detects new image version
- image-automation-controller updates manifest in Git
- Commits and pushes the change
- source-controller detects the Git change
- kustomize-controller/helm-controller deploys the new version
Controller Communication
Monitoring Flux Components
- Check Status
- View Logs
- Reconcile Manually
- Metrics
View the status of all Flux resources:Check specific Kustomizations:
Security Considerations
RBAC
Controllers use ServiceAccounts with specific RBAC permissions. The kustomize and helm controllers have ClusterAdmin access.
Network Policies
NetworkPolicies restrict traffic to and from Flux components, allowing only necessary communication.
Secret Management
Git credentials and other secrets are stored in Kubernetes Secrets with appropriate access controls.
Pod Security
Flux namespace has pod security warnings enabled for restricted policies.
Flux Version
Kimbernetes runs Flux v2.7.5 with all six controllers enabled:This version was installed during bootstrap and is defined in
cluster/kimawesome/flux-system/gotk-components.yaml:1-4.Next Steps
Kustomize Overlays
Learn how Kustomize overlays work with the kustomize-controller
Troubleshooting
Debug common Flux issues and understand controller behavior
Upgrading Flux
Learn how to safely upgrade Flux components
Repository Structure
Review how the repository is organized for Flux