Prerequisites
- A running Kubernetes cluster with Flux installed in the
flux-systemnamespace - An OCI registry account (e.g., GitHub Container Registry)
- A personal access token (PAT) or registry credentials with pull permissions
1. Create the OCI Secret
First, store your registry credentials in a FluxSecret of type OCI. This will allow Flux to authenticate when fetching artifacts.
Do not commit your
<GitHub-Personal-Access-Token> or any credentials into your Git repository. Treat them as sensitive data.2. Register the OCI Repository as a Source
Point Flux to your OCI‐hosted image or artifact by creating anOCIRepository source.
3. Apply Manifests with Kustomization
Once theOCIRepository is ready, deploy its manifests into your cluster via a Kustomization.
Set
--prune=false if you want to retain orphaned resources. Adjust --interval to control reconciliation frequency.4. Fetching OCI-Hosted Helm Charts
Flux’s Kustomize Controller cannot process Helm charts directly. To deploy charts stored in an OCI registry, register the same registry as a Helm source.4.1 Register the Helm Repository
4.2 Deploy the Helm Chart
Create aHelmRelease to instruct Flux’s Helm Controller to fetch and install the chart.
Comparison of OCI vs. Helm Sources
Links and References
- Flux CD Documentation
- OCI Artifacts Specification
- Kustomize Controller
- Helm Controller
- GitHub Container Registry