You can Watch all our Tutorials and Training Videos for Free on ourYouTube Channel

ArgoCD Kustomize Example: Deploying Applications with Ease

ArgoCD Kustomize Example Deploying Applications with Ease, argocd kustomize, argocd kustomize example, argocd with kustomize
ArgoCD Kustomize Example Deploying Applications with Ease

ArgoCD is an open-source continuous delivery tool that provides a declarative approach to deploy and manage applications on Kubernetes. Kustomize is a tool that allows you to customize Kubernetes resources by managing them as separate components. Together, they make a powerful combination for deploying applications with ease. In this article, we will explore how to use ArgoCD with Kustomize to deploy applications on Kubernetes.


Before we start, make sure that you have the following installed:

  • Kubernetes cluster
  • ArgoCD
  • Kustomize

Step 1: Create an Application in ArgoCD

The first step is to create an application in ArgoCD. You can create an application using the CLI or the ArgoCD UI. Here's an example using the CLI:

argocd app create my-app \
--repo \
--path kustomize \
--dest-server https://kubernetes.default.svc \
--dest-namespace my-namespace \
--auto-prune \
--sync-policy automated

This creates an application named my-app and sets the source to a Git repository. The path to the Kubernetes manifests is set to kustomize, and the destination server and namespace are specified. auto-prune will remove any resources that are not in the Git repository, and sync-policy will automatically sync the application when there are changes.

Step 2: Create a Kustomization File

Next, we need to create a Kustomization file to specify the components of our application. Here's an example Kustomization file:

kind: Kustomization

namespace: my-namespace

- deployment.yaml
- service.yaml

- name: my-config
- configmap.yaml

This Kustomization file specifies that we want to deploy a deployment and a service, both defined in separate YAML files. It also generates a configMap using the configmap.yaml file.

Step 3: Commit Changes to Git

After creating the Kustomization file, commit the changes to your Git repository. ArgoCD will automatically detect the changes and deploy the application.

Step 4: Monitor the Application

You can monitor the application by checking the ArgoCD UI or using the CLI. Here's an example CLI command to check the status of the application:

argocd app get my-app

This command will show you the status of the application, including any errors or warnings.

Step 5: Update the Application

To update the application, simply make changes to the YAML files, commit them to Git, and ArgoCD will automatically detect the changes and deploy them.

More Examples:

Here are some additional examples of using ArgoCD with Kustomize:

  • Using overlays to deploy the same application with different configurations
  • Using Kustomize to manage Helm charts
  • Using Kustomize to manage configuration files

Using ArgoCD with Kustomize provides a powerful way to manage and deploy applications on Kubernetes. By using a declarative approach, we can easily manage the components of our application and update them as needed. With these tools, we can focus on developing our applications and let the tools handle the deployment.

Related Searches and Questions asked:

  • CD Workflow with ArgoCD
  • Installing ArgoCD on Kubernetes
  • What is the difference between GitOps and ArgoCD?
  • CD Workflow Without ArgoCD
  • That's it for this post. Keep practicing and have fun. Leave your comments if any.

    Cookie Consent
    We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
    It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
    AdBlock Detected!
    We have detected that you are using adblocking plugin in your browser.
    The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
    Site is Blocked
    Sorry! This site is not available in your country.
    whatsapp logo