🎯 Task #3 — Enable AutoSync + Health Checks + Self-Heal in ArgoCD

ArgoCD is powerful because it continuously watches Git and your cluster, and keeps them in sync.
This task enables:

✅ Auto-Sync

Automatically apply changes from Git to the cluster.

✅ Self-Heal

If someone manually edits or deletes a Kubernetes objec…


This content originally appeared on DEV Community and was authored by Latchu@DevOps

ArgoCD is powerful because it continuously watches Git and your cluster, and keeps them in sync.
This task enables:

✅ Auto-Sync

Automatically apply changes from Git to the cluster.

✅ Self-Heal

If someone manually edits or deletes a Kubernetes object, ArgoCD restores it from Git.

✅ Auto-Prune

Remove Kubernetes resources that were removed from Git.

✅ Rollbacks

If a sync fails, ArgoCD will automatically roll back to a good version.

⭐ Step 1 — Enable AutoSync in ArgoCD UI

Go to:

Applications → Select your app → App Details → Sync Policy

Turn ON:

  • Auto-Sync
  • Prune Resources
  • Self Heal

1

These correspond to:

Setting Meaning
Auto-Sync If Git changes, ArgoCD automatically applies the changes to the cluster.
Prune If a file (resource) is deleted from Git, ArgoCD deletes that resource from the cluster.
Self-Heal If someone manually changes something in the cluster (via kubectl), ArgoCD restores it back to match Git.

⭐ Step 2 — Verify AutoSync is Working

(1) Update something in Git

Edit your deployment.yaml image tag:

image: nginx:1.27

Push it:

git add .
git commit -m "Update version"
git push

Expected result:

  • ArgoCD UI shows "OutOfSync → Syncing → Healthy"
  • New image deployed automatically

2

If you check with pods,

3

⭐ Step 3 — Test Self-Heal (Drift Correction)

Modify something manually in the cluster:

kubectl edit deploy demo-app

Change replicas from 2 to 5 and save.

➡️ ArgoCD will detect drift
➡️ ArgoCD will automatically revert replicas back to the Git value (e.g. 2)

This proves self-heal is working.

4

⭐ Step 4 — Test Auto-Rollback

Break the deployment:

Edit your deployment.yaml and use a fake image:

image: nginx:does-not-exist

Push it.

Expected:

  • ArgoCD tries to sync
  • Sync fails
  • ArgoCD rollback mechanism applies the last healthy version automatically (using retry + failure detection)

Your app will remain healthy 👌

⭐ Step 5 — Test Auto-Prune

Delete the service from GitHub:

rm service.yaml
git add .
git commit -m "Remove service"
git push

➡️ ArgoCD will detect the file removed
➡️ It will delete the Service in Kubernetes automatically

5

🎉 Final Result — What You Achieved

With Task #3 completed, your app now has:

| Feature                                     | Status    |
| ------------------------------------------- | --------- |
| Automatic Git → Cluster sync                | ✅ Enabled |
| Automatically revert manual kubectl changes | ✅ Enabled |
| Automatically delete removed resources      | ✅ Enabled |
| Automatic rollback to last good version     | ✅ Enabled |
| Continuous health monitoring                | ✅ Enabled |

🌟 Thanks for reading! If this post added value, a like ❤️, follow, or share would encourage me to keep creating more content.

— Latchu | Senior DevOps & Cloud Engineer

☁️ AWS | GCP | ☸️ Kubernetes | 🔐 Security | ⚡ Automation
📌 Sharing hands-on guides, best practices & real-world cloud solutions


This content originally appeared on DEV Community and was authored by Latchu@DevOps


Print Share Comment Cite Upload Translate Updates
APA

Latchu@DevOps | Sciencx (2025-11-27T12:49:52+00:00) 🎯 Task #3 — Enable AutoSync + Health Checks + Self-Heal in ArgoCD. Retrieved from https://www.scien.cx/2025/11/27/%f0%9f%8e%af-task-3-enable-autosync-health-checks-self-heal-in-argocd/

MLA
" » 🎯 Task #3 — Enable AutoSync + Health Checks + Self-Heal in ArgoCD." Latchu@DevOps | Sciencx - Thursday November 27, 2025, https://www.scien.cx/2025/11/27/%f0%9f%8e%af-task-3-enable-autosync-health-checks-self-heal-in-argocd/
HARVARD
Latchu@DevOps | Sciencx Thursday November 27, 2025 » 🎯 Task #3 — Enable AutoSync + Health Checks + Self-Heal in ArgoCD., viewed ,<https://www.scien.cx/2025/11/27/%f0%9f%8e%af-task-3-enable-autosync-health-checks-self-heal-in-argocd/>
VANCOUVER
Latchu@DevOps | Sciencx - » 🎯 Task #3 — Enable AutoSync + Health Checks + Self-Heal in ArgoCD. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/11/27/%f0%9f%8e%af-task-3-enable-autosync-health-checks-self-heal-in-argocd/
CHICAGO
" » 🎯 Task #3 — Enable AutoSync + Health Checks + Self-Heal in ArgoCD." Latchu@DevOps | Sciencx - Accessed . https://www.scien.cx/2025/11/27/%f0%9f%8e%af-task-3-enable-autosync-health-checks-self-heal-in-argocd/
IEEE
" » 🎯 Task #3 — Enable AutoSync + Health Checks + Self-Heal in ArgoCD." Latchu@DevOps | Sciencx [Online]. Available: https://www.scien.cx/2025/11/27/%f0%9f%8e%af-task-3-enable-autosync-health-checks-self-heal-in-argocd/. [Accessed: ]
rf:citation
» 🎯 Task #3 — Enable AutoSync + Health Checks + Self-Heal in ArgoCD | Latchu@DevOps | Sciencx | https://www.scien.cx/2025/11/27/%f0%9f%8e%af-task-3-enable-autosync-health-checks-self-heal-in-argocd/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.