๐Ÿš€ Accelerate Deployments with Argo CD Image Updater

In the fast-moving world of software development, continuous integration and continuous delivery (CI/CD) have become essential for delivering quality features at speed. At Infivit, we recently streamlined CI/CD pipeline for one of our client by integrating GitHub Actions with Argo CD Image Updater, resulting in a significant boost in deployment automation, developer velocity, and operational efficiency.

In this blog, weโ€™ll walk through how this setup worksโ€”and more importantly, how it helps save time, reduce manual effort, and accelerate feature delivery.

๐Ÿ”ง Why We Chose This Stack

GitHub Actions for CI

GitHub Actions allows us to run CI workflows directly from our repositories. With every code push:

  • Test cases are run
  • Code is linted
  • Docker images are built and pushed to GHCR

Argo CD for CD

Argo CD continuously syncs Kubernetes clusters with our Git repositories. It uses a GitOps model to ensure our clusters always reflect the state defined in Git.

Argo CD Image Updater: The Missing Link

This tool automatically monitors image registries and updates Kubernetes manifests in Git when new image tags are availableโ€”removing the need for manual version bumps in YAML files.

โš™๏ธ Our CI/CD Pipeline at a Glance


A[Developer pushes code to GitHub] --> B[GitHub Actions triggered]
B --> C[Docker image built]
C --> D[Image pushed to GHCR]
D --> E[Argo CD Image Updater detects new tag]
E --> F[Deployment YAML updated in Git]
F --> G[Argo CD syncs cluster]
G --> H[Application updated in Kubernetes]

๐Ÿ› ๏ธ Step-by-Step Setup

Now that we’ve seen how the flow works, letโ€™s walk through the step-by-step setup of the CI/CD pipeline using GitHub Actions, Argo CD, and Argo CD Image Updater.

๐Ÿณ 1. Install Docker
Download from: https://www.docker.com/products/docker-desktop
๐Ÿ™ 2. GitHub Repository Setup
Create a GitHub repo to store:
Application code (e.g., Node.js app)
Kubernetes manifests (deployment.yaml,service.yaml)
GitHub Actions workflow (.github/workflows/deploy.yml)
โ˜ธ๏ธ 3. Install & Configure Kubernetes Cluster
https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/
๐Ÿš€ 4. Install Argo CD
https://argo-cd.readthedocs.io/en/stable/operator-manual/installation/#installation
๐Ÿ” 5. Install Argo CD Image Updater
https://argocd-image-updater.readthedocs.io/en/stable/install/installation/
  • Configure Git access (if using write-back-method: git)
  • Optionally configure image registry credentials via Kubernetes secrets.
๐Ÿ“ฆ 6. Configure GitHub Actions
Add .github/workflows/deploy.yml
Set up GitHub Secrets:
GHCR_TOKEN, DOCKER_USERNAME, etc

๐Ÿงฉ Step-by-Step Implementation

1. Set Up GitHub Actions (CI)

Create .github/workflows/deploy.yml:

name: CI Pipeline

on:
 
 push:
    branches: [ main ]

jobs:
  
   build:
       runs-on: ubuntu-latest
       steps:
       -  name: Checkout code
          uses: actions/checkout@v3

    - name: Log in to GHCR
      run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

    - name: Build and push Docker image
      run: |
        docker build -t ghcr.io/your_username/your-app:${{ github.sha }} .
        docker push ghcr.io/your_username/your-app:${{ github.sha }}

2.  Configure Argo CD Application 

Your application.yaml might look like:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: my-app
spec:
  source:
    repoURL: https://github.com/your_username/your-repo
    targetRevision: HEAD
  destination:
    server: https://kubernetes.default.svc
    namespace: default
  syncPolicy:
    automated:
      prune: true
3.  Creating an Argo CD Application through GUI

Step-by-Step Guide

1. ๐Ÿ” Log in to the Argo CD Dashboard
  • Login with your Argo CD admin credentials.
2. โž• Click on โ€œNEW APPโ€
  • On the top-right corner, click the โ€œ+ NEW APPโ€ button to create a new application.
3. ๐Ÿ“ Fill Out Application Info
FieldDescription
Application NameName of your app, e.g., grade-submission-api
ProjectLeave as default (or select your project)
Sync PolicyChoose automatic or manual (you can enable self-heal/prune later)

4. ๐Ÿ“ Define Source Repository
FieldExample
Repository URLhttps://github.com/your_username/your-repo.git
RevisionHEAD or a branch name (e.g., main)
Path. or path to your Kubernetes manifests (e.g., manifests/)

5. โ˜ธ๏ธ Configure the Destination
FieldValue
Cluster URLhttps://kubernetes.default.svc (for in-cluster)
Namespacee.g., default or production

6. โœ… Create and Sync
  • Click โ€œCreateโ€ to finish.
  • Once created, click โ€œSYNCโ€ to deploy the app to your Kubernetes cluster.
  • Youโ€™ll see real-time status like Synced, Healthy, OutOfSync, etc

4. ๐Ÿ”„ Configure Argo CD Image Updater

Add these annotations to your deployment YAML:

metadata:

 annotations:

   argocd-image-updater.argoproj.io/image-list: ghcr.io/your_username/your-app

   argocd-image-updater.argoproj.io/write-back-method: git

   argocd-image-updater.argoproj.io/your_username_your-app.update-strategy: latest

โœ… Now, Image Updater will:

  • Detect a new image pushed to
  • Commit a change to your deployment YAML with the new image tag
  • Argo CD auto-syncs and deploys it to your cluster
โœ… Final Result
  1. Dev pushes code to GitHub
  2. GitHub Actions builds & pushes a Docker image
  3. Argo CD Image Updater detects the new image
  4. Updates deployment manifest in Git
  5. Argo CD syncs and deploys it to Kubernetes
  6. Your app is automatically updated!