@shinyaz

Deleting an ArgoCD Application doesn't delete deployed resources — you need a finalizer

1 min read

After testing ArgoCD Capability on EKS, I ran kubectl delete application guestbook -n argocd expecting everything to clean up. The Application CR was gone, but the deployed Pod and Service were still running.

To cascade-delete deployed resources when removing an Application, you need a finalizer:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: guestbook
  namespace: argocd
  finalizers:
    - resources-finalizer.argocd.argoproj.io
spec:
  # ...

Without it, only the Application CR gets deleted and deployed resources become orphaned. Note that syncPolicy.automated.prune: true only removes stale resources during sync—it has nothing to do with Application deletion. Even for testing, adding the finalizer saves cleanup headaches.

Share this post

Shinya Tahara

Shinya Tahara

Solutions Architect @ AWS

I'm a Solutions Architect at AWS, providing technical guidance primarily to financial industry customers. I share learnings about cloud architecture and AI/ML on this blog.