Hands-on Lab·Kubernetes and Cloud Native Associate
GitOps Self-Heal and Prune
Scale a managed Deployment by hand and the change is gone before the next command runs. Then create a ConfigMap in the same namespace and watch prune leave it completely alone.
Delivery and GitOps Guide 44 of 46 Intermediate
- Kubernetes1.36.4
- Cluster4 nodes
- Runtimecontainerd 2.2.6
- CNICalico v3.32.1
- TimeAbout 15 min
The stable manifests move. The behaviour shown here - the annotation limit, self-heal, prune scope - is not version specific.
- Argo CDstable manifests, 2026-08
- Source repoargoproj/argocd-example-apps
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| CKA1001 | 192.168.0.175 | Ubuntu 26.04 LTS | Control Plane Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE01 | 192.168.0.176 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE02 | 192.168.0.177 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE03 | 192.168.0.178 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
This guide includes
Use this when a manual change to a GitOps-managed workload vanishes, and you need to know what else will and will not be reverted. This matters because self-heal reverts what Argo CD manages while prune ignores what it never created, and that boundary is not obvious until you cross it.
- scaling a managed Deployment by hand and finding the change gone before the next command runs
- patching it instead, and getting the identical result
- creating a ConfigMap by hand in the managed namespace and watching prune leave it alone
Before you start
- The guestbook Application from the previous guide, with
selfHeal: trueandprune: true.
-
Try to scale it
-
Patch it, same result
-
Prune only touches what it manages