World map

 

BM: Baca dalam Bahasa Melayu

World K7: Self-Driving

Automatic image updates

You will learn: how a robot spots a new image tag and commits it to Git for you.

Checked with Kubernetes 1.37 on 31 Oct 2026

The problem

Your pipeline ships a new image every merge: 1.5.0, 1.5.1, 1.5.2. Each time, someone edits the image line in Git by hand. Who should do this boring job?

Pick one answer.

Try it

This robot is called image automation: A robot that spots a new image tag in the shop freezer and commits it to Git for you.. Put its loop in order.

First step at the top. Put these in order. Use the arrows, or drag.

  • The robot commits the new tag to Git
  • CI pushes shop:1.5.0 to the registry
  • Argo CD or Flux syncs that commit
  • New pods run 1.5.0
  • The robot sees a new tag

Try it

Be the robot. A new tag landed in the registry. Pick it, then commit.

Change one line in Git and commit. Watch the cluster follow.

Git (the order board)

apps/shop/deployment.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
name: shop
spec:
replicas: 3
# selector and template: same as before
image:
Show the whole file
apiVersion: apps/v1
kind: Deployment
metadata:
  name: shop
  namespace: shop
spec:
  replicas: 3
  selector:
    matchLabels:
      app: shop
  template:
    metadata:
      labels:
        app: shop
    spec:
      containers:
        - name: web
          image: ghcr.io/kedai-kancil/shop:1.5.0

Commits

  1. f89a8e9 Add shopin the cluster

Cluster · namespace shop

Sync: SyncedHealth: Healthy

Deployment shop: 3/3 ready · image 1.5.0

Manual change (drift)
syncPolicy:
  automated:
    selfHeal: true
Show the Argo CD Application
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: shop
  namespace: argocd
spec:
  project: default
  source:
    repoURL: "https://github.com/kedai-kancil/gitops.git"
    path: apps/shop
    targetRevision: main
  destination:
    server: "https://kubernetes.default.svc"
    namespace: shop
  syncPolicy:
    automated:
      selfHeal: true
Nothing to do. Git and the cluster match.

Watch

Flux finds the line to change by a marker comment. Tap the line the robot rewrites.

Tap the line with the marker.

0 of 1 found

Check

The policy allows >=1.5.0 <2.0.0. Swipe right on tags the robot may pick.

Swipe right for good, left for needs work. Or use the buttons.

1 / 51.5.2
1.5.2

Predict

Why should the robot commit to Git, not change the cluster directly?

Pick one answer.

You did it!

You can now let a robot ship new image tags through Git.

Go deeper (optional)

Flux uses three objects: ImageRepository (scan), ImagePolicy (pick) and ImageUpdateAutomation (commit). Argo CD Image Updater can also commit to Git. Its docs say it is still under active development, so test it first. Tools like Renovate open a pull request instead. Real rep (optional): read the Flux image update guide.