How do you use Kustomize with an ArgoCD Application?
Short answer
Point the source path at a directory containing a kustomization.yaml; ArgoCD runs `kustomize build` to render manifests.
Advertisement
AModel answer
Point the source path at a directory containing a kustomization.yaml; ArgoCD runs `kustomize build` to render manifests. You can set images, name prefixes/suffixes, and common labels via the kustomize section, and structure base + overlays per environment so each Application references the right overlay.
source:
path: overlays/production
kustomize:
images:
- myapp=myrepo/myapp:v2.0
namePrefix: prod-Real-world example
The production Application points at overlays/production, which patches the shared base with prod-specific replicas and image tags.
Likely follow-ups
- What is a base vs overlay? | How do you override the image with Kustomize?
Related topics