Subtopic•Kustomize Integration

Kustomize Overview In Argocd

In the previous section, we finished our study of advanced Helm integrations, covering subchart dependencies, private repository connections, OCI registry integrations, and options to ignore missing values. With those templates clear, we will now start Module 6: Kustomize with ArgoCD, beginning with Kustomize Integration Overview.

Kustomize is a template-free configuration management tool that allows you to customize raw, untemplated Kubernetes manifests without modifying the original files. It is natively integrated into modern versions of kubectl and supported directly inside ArgoCD's Repository Server.

In this guide, we will cover the internal architecture of Kustomize compilation, explain how the repo-server processes files, and compare Kustomize with Helm.

1. How ArgoCD Integrates with Kustomize

When you deploy a Kustomize application, the argocd-repo-server processes the files. Instead of running scripts or templates, the repo-server compiles the files using the built-in Kustomize binary:

               Kustomize Compilation Lifecycle
┌────────────────────────────────────────────────────────┐
│  Phase 1: Fetch Source                                 │
│  - Clones the Git repository and caches local files    │
├────────────────────────────────────────────────────────┤
│  Phase 2: Render Manifests                             │
│  - Runs: kustomize build <target-directory-path>       │
│    merging patches, prefixes, and image tags.           │
├────────────────────────────────────────────────────────┤
│  Phase 3: Apply Manifests                              │
│  - Returns compiled YAML to Application Controller     │
│  - Controller applies resources via Kubernetes API     │
└────────────────────────────────────────────────────────┘

The Application Controller receives only raw Kubernetes manifests. It does not know that the resources were originally structured using Kustomize overlays.


2. Kustomize vs. Helm: A Structural Comparison

Engineering teams choose between Helm and Kustomize based on application complexity and deployment targets:

  • Helm (Template-Based): Focuses on packaging and reusability. It uses Jinja2-style templating to generate manifests dynamically. It is ideal for public distribution (e.g., deploying third-party databases or operators).
  • Kustomize (Overlay-Based): Focuses on configuration customization without templates. It uses raw manifests as a "base" and applies "overlays" (patches) to customize configurations for different environments, keeping the code clean.

3. Operational Best Practices: Kustomize Architecture

  • Enforce version pinning: Always specify explicit Kustomize version tags inside your repo-server settings to prevent compilation failures during tool upgrades.
  • Keep overlays modular: Write separate patch files for different concerns (e.g., one patch for services, one for resource limits) to keep your project structure easy to navigate.
  • Validate Kustomize builds: Run syntax validation checks in your CI pipeline before committing changes to Git:
    kustomize build overlays/production/
    

---

## 4. Kustomize Integration Reference Summary

| Architectural Dimension | Helm Integration | Kustomize Integration |
| :--- | :--- | :--- |
| **Configuration Model** | Jinja2-style templates. | Base and overlay raw YAML files. |
| **Compilation Tool** | `helm template` | `kustomize build` |
| **Image Patching** | Value overrides. | Dynamic `kustomize.images` patches. |
| **Best Use Case** | Third-party software packages. | Internal application environment configs. |

Now that we have covered the architectural design of ArgoCD's Kustomize integration, the next step is deploying Kustomize applications. In the next section, we will cover how to configure and deploy Kustomize applications.
←Previous ModuleHelm with ArgoCD