Install and configure ArgoCD Image Updater for automatic Kubernetes deployments with GitOps automation

Intermediate 25 min Apr 21, 2026 67 views
Ubuntu 24.04 Debian 12 AlmaLinux 9 Rocky Linux 9

Set up ArgoCD Image Updater to automatically monitor container registries and update Kubernetes deployments when new image versions are available. Configure GitOps workflows with automated Git commits and Prometheus monitoring for seamless CI/CD integration.

Prerequisites

  • Kubernetes cluster with ArgoCD installed
  • kubectl configured with cluster admin access
  • Git repository for storing application manifests
  • Container registry access (Docker Hub, GitHub, etc.)
  • Basic understanding of Kubernetes and GitOps concepts

What this solves

ArgoCD Image Updater automatically monitors container registries for new image versions and updates your Kubernetes deployments through GitOps workflows. This eliminates manual image updates while maintaining Git as the single source of truth for your cluster state. You get automated deployment updates with full audit trails and rollback capabilities.

Prerequisites

Before starting, ensure you have a working ArgoCD installation in your Kubernetes cluster. You'll also need Git repository access for your application manifests and container registry credentials if using private repositories.

Note: This tutorial assumes you have ArgoCD already installed. If you need to set up ArgoCD first, check our ArgoCD installation guide.

Step-by-step installation

Install ArgoCD Image Updater with Kubernetes manifests

Deploy ArgoCD Image Updater using the official Kubernetes manifests. This installs the controller and required RBAC permissions.

kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj-labs/argocd-image-updater/stable/manifests/install.yaml

Verify the installation

Check that the ArgoCD Image Updater pod is running and ready in the argocd namespace.

kubectl get pods -n argocd -l app.kubernetes.io/name=argocd-image-updater
kubectl logs -n argocd deployment/argocd-image-updater

Alternative installation with Helm

If you prefer Helm charts, you can install ArgoCD Image Updater using the community Helm chart with custom values.

helm repo add argo https://argoproj.github.io/argo-helm
helm repo update
replicaCount: 1
image:
  repository: quay.io/argoproj/argocd-image-updater
  tag: v0.12.2
config:
  argocd:
    grpcWeb: true
    serverAddress: "https://argocd-server.argocd.svc.cluster.local"
    insecure: false
    plaintext: false
metrics:
  enabled: true
  serviceMonitor:
    enabled: true
helm install argocd-image-updater argo/argocd-image-updater -n argocd -f values.yaml

Configure registry authentication

Create a secret for private registry authentication. This example shows Docker Hub, but works with any registry.

kubectl create secret docker-registry regcred \
  --docker-server=https://index.docker.io/v1/ \
  --docker-username=your-username \
  --docker-password=your-password \
  --docker-email=your-email@example.com \
  -n argocd

Create ArgoCD Image Updater configuration

Configure the image updater with registry settings and update policies. This ConfigMap defines how the updater connects to registries and Git.

apiVersion: v1
kind: ConfigMap
metadata:
  name: argocd-image-updater-config
  namespace: argocd
data:
  registries.conf: |
    registries:
    - name: Docker Hub
      api_url: https://registry-1.docker.io
      ping: yes
      credentials: pullsecret:argocd/regcred
    - name: GitHub Container Registry
      api_url: https://ghcr.io
      prefix: ghcr.io
      ping: yes
      credentials: env:GITHUB_TOKEN
  git.conf: |
    git:
      user: argocd-image-updater
      email: argocd-image-updater@example.com
  ssh_config: |
    Host *
      PubkeyAcceptedAlgorithms +ssh-rsa
      HostkeyAlgorithms +ssh-rsa
kubectl apply -f argocd-image-updater-config.yaml

Configure Git repository access

Create SSH keys for Git repository access and configure the secret for automated commits.

ssh-keygen -t ed25519 -f /tmp/argocd-image-updater -N ""
kubectl create secret generic argocd-image-updater-secret \
  --from-file=sshPrivateKey=/tmp/argocd-image-updater \
  -n argocd

Add the public key to your Git repository's deploy keys with write access:

cat /tmp/argocd-image-updater.pub

Update ArgoCD Image Updater deployment

Modify the deployment to mount the Git SSH key and set environment variables for registry authentication.

spec:
  template:
    spec:
      containers:
      - name: argocd-image-updater
        env:
        - name: GITHUB_TOKEN
          valueFrom:
            secretKeyRef:
              name: github-token
              key: token
        volumeMounts:
        - name: ssh-key
          mountPath: /app/config/ssh
          readOnly: true
        - name: known-hosts
          mountPath: /app/config/ssh/known_hosts
          subPath: known_hosts
          readOnly: true
      volumes:
      - name: ssh-key
        secret:
          secretName: argocd-image-updater-secret
          defaultMode: 0600
      - name: known-hosts
        configMap:
          name: argocd-ssh-known-hosts-cm
          defaultMode: 0644
kubectl patch deployment argocd-image-updater -n argocd --patch-file argocd-image-updater-patch.yaml

Configure automatic image updates

Annotate ArgoCD applications

Add annotations to your ArgoCD Application to enable automatic image updates. These annotations tell the updater which images to monitor and how to update them.

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: my-app
  namespace: argocd
  annotations:
    argocd-image-updater.argoproj.io/image-list: myapp=nginx:1.20
    argocd-image-updater.argoproj.io/myapp.update-strategy: semver
    argocd-image-updater.argoproj.io/myapp.allow-tags: regexp:^1\.[2-9][0-9]\.
    argocd-image-updater.argoproj.io/write-back-method: git:secret:argocd/argocd-image-updater-secret
    argocd-image-updater.argoproj.io/git-branch: main
spec:
  project: default
  source:
    repoURL: git@github.com:example/my-app-config.git
    targetRevision: main
    path: k8s
  destination:
    server: https://kubernetes.default.svc
    namespace: default
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
kubectl apply -f application.yaml

Configure update strategies

Set up different update strategies for various environments. This example shows semantic versioning with different policies for staging and production.

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: my-app-staging
  namespace: argocd
  annotations:
    argocd-image-updater.argoproj.io/image-list: myapp=nginx
    argocd-image-updater.argoproj.io/myapp.update-strategy: latest
    argocd-image-updater.argoproj.io/myapp.allow-tags: regexp:^[0-9]+\.[0-9]+\.[0-9]+$
    argocd-image-updater.argoproj.io/write-back-method: git
spec:
  source:
    repoURL: https://github.com/example/my-app-config.git
    path: staging
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: my-app-production
  namespace: argocd
  annotations:
    argocd-image-updater.argoproj.io/image-list: myapp=nginx
    argocd-image-updater.argoproj.io/myapp.update-strategy: semver:~1.20
    argocd-image-updater.argoproj.io/myapp.ignore-tags: latest,main,dev
    argocd-image-updater.argoproj.io/write-back-method: git
spec:
  source:
    repoURL: https://github.com/example/my-app-config.git
    path: production

Configure polling intervals

Set custom polling intervals for different applications based on update frequency requirements.

kubectl patch configmap argocd-image-updater-config -n argocd --patch '{
  "data": {
    "config.yaml": "interval: 2m\ndefaultUpdateStrategy: semver\nregistryTimeout: 20s\ngitTimeout: 30s\nlogLevel: info"
  }
}'

Set up GitOps workflows

Configure Git repository integration

Set up the image updater to automatically commit changes to your Git repository when new images are detected.

apiVersion: v1
kind: ConfigMap
metadata:
  name: argocd-image-updater-git-config
  namespace: argocd
data:
  config: |
    git:
      user: ArgoCD Image Updater
      email: argocd-image-updater@example.com
      commitMessageTemplate: |
        build: automatic update of {{ .AppName }}
        
        {{ range .AppChanges -}}
        {{ .Image }} -> {{ .NewTag }}
        {{ end -}}
        
        Updated by ArgoCD Image Updater
kubectl apply -f git-config.yaml

Configure commit automation

Set up branch protection and automatic pull request creation for production environments.

apiVersion: v1
kind: ConfigMap
metadata:
  name: argocd-image-updater-pr-config
  namespace: argocd
data:
  pr-template: |
    ## Automatic Image Update
    
    This PR was automatically created by ArgoCD Image Updater.
    
    ### Changes
    {{ range .AppChanges -}}
    - {{ .AppName }}: {{ .Image }} → {{ .NewTag }}
    {{ end -}}
    
    ### Verification
    - [ ] Security scan passed
    - [ ] Integration tests passed
    - [ ] Performance regression check
    
    /cc @devops-team
kubectl apply -f pr-template.yaml

Configure webhook notifications

Set up Slack notifications for image updates and deployment changes.

apiVersion: v1
kind: ConfigMap
metadata:
  name: argocd-image-updater-webhook-config
  namespace: argocd
data:
  webhooks.yaml: |
    webhooks:
      slack:
        url: https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK
        events:
        - update
        - error
        template: |
          {
            "text": "ArgoCD Image Updater: {{ .AppName }} updated {{ .Image }} to {{ .NewTag }}",
            "username": "ArgoCD Image Updater",
            "icon_emoji": ":rocket:"
          }
kubectl apply -f webhook-config.yaml

Monitor image updates

Enable Prometheus metrics

Configure ArgoCD Image Updater to expose metrics for monitoring with Prometheus and Grafana.

apiVersion: v1
kind: Service
metadata:
  name: argocd-image-updater-metrics
  namespace: argocd
  labels:
    app.kubernetes.io/name: argocd-image-updater
spec:
  selector:
    app.kubernetes.io/name: argocd-image-updater
  ports:
  - name: metrics
    port: 8080
    targetPort: 8080
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: argocd-image-updater
  namespace: argocd
spec:
  selector:
    matchLabels:
      app.kubernetes.io/name: argocd-image-updater
  endpoints:
  - port: metrics
    path: /metrics
kubectl apply -f metrics-service.yaml

Create Grafana dashboard

Import a dashboard to visualize image update metrics, registry polling, and Git commit statistics.

{
  "dashboard": {
    "title": "ArgoCD Image Updater",
    "panels": [
      {
        "title": "Applications Updated",
        "type": "stat",
        "targets": [{
          "expr": "increase(argocd_image_updater_applications_updated_total[24h])"
        }]
      },
      {
        "title": "Registry Polling Errors",
        "type": "stat",
        "targets": [{
          "expr": "argocd_image_updater_registry_requests_errors_total"
        }]
      },
      {
        "title": "Update Rate",
        "type": "graph",
        "targets": [{
          "expr": "rate(argocd_image_updater_applications_updated_total[5m])"
        }]
      }
    ]
  }
}

Set up alerting rules

Create Prometheus alerting rules for failed updates and registry connection issues.

groups:
  • name: argocd-image-updater
rules: - alert: ImageUpdaterRegistryError expr: increase(argocd_image_updater_registry_requests_errors_total[5m]) > 0 for: 2m labels: severity: warning annotations: summary: "ArgoCD Image Updater registry errors" description: "Image updater has {{ $value }} registry errors in the last 5 minutes" - alert: ImageUpdaterGitError expr: increase(argocd_image_updater_git_requests_errors_total[5m]) > 0 for: 2m labels: severity: warning annotations: summary: "ArgoCD Image Updater Git errors" description: "Image updater has {{ $value }} Git errors in the last 5 minutes"
kubectl apply -f alerts.yaml

Verify your setup

Test the complete ArgoCD Image Updater workflow by checking application annotations, monitoring logs, and verifying Git commits.

# Check image updater pod status
kubectl get pods -n argocd -l app.kubernetes.io/name=argocd-image-updater

View recent logs

kubectl logs -n argocd deployment/argocd-image-updater --tail=50

Check application annotations

kubectl get application my-app -n argocd -o jsonpath='{.metadata.annotations}'

Verify metrics endpoint

kubectl port-forward -n argocd service/argocd-image-updater-metrics 8080:8080 curl http://localhost:8080/metrics | grep argocd_image_updater

Check for recent Git commits

git log --oneline --grep="ArgoCD Image Updater" --since="1 day ago"
Note: For comprehensive Kubernetes monitoring including ArgoCD applications, see our Kubernetes monitoring with Prometheus and Grafana guide.

Common issues

SymptomCauseFix
Image updater pod crashloopingMissing or invalid registry credentialsCheck secret exists: kubectl get secret regcred -n argocd
No image updates detectedIncorrect application annotationsVerify annotation syntax and image list format
Git push failuresSSH key not added to repositoryAdd public key to repository deploy keys with write access
Registry connection timeoutNetwork policy blocking accessAllow egress to registry on port 443: kubectl apply -f network-policy.yaml
Metrics not appearingServiceMonitor not createdEnsure Prometheus operator is installed and ServiceMonitor applied
Webhook notifications failingInvalid webhook URL or formatTest webhook URL manually and verify payload format

Next steps

Running this in production?

Want this handled for you? Setting up image automation once is straightforward. Keeping it patched, monitored, backed up and performant across environments is the harder part. See how we run infrastructure like this for European teams.

Automated install script

Run this to automate the entire setup

Need help?

Don't want to manage this yourself?

We handle managed devops services for businesses that depend on uptime. From initial setup to ongoing operations.