A cluster is being decommissioned. How do you remove it from Argo CD without breaking anything else?
IntermediateScenarioEnvironments, ApplicationSets & Multi-Cluster
Answer
Situation read → Generated apps target this cluster; cascade delete may try to delete workloads in a cluster that is going away.
What I'd do →
- Remove the cluster's labels (or Secret) in Git so generators drop its Applications.
- If the cluster is already unreachable, set
preserveResourcesOnDeletion: truetemporarily or remove finalizers so deletion does not hang trying to reach it. - Delete hand-made Applications targeting it, then
argocd cluster rm. - Check
argocd app listfor any app still referencing the server.
Why → Finalizers on apps for an unreachable cluster block deletion forever.
Interview tip → Mention apps stuck in Terminating as the classic symptom.
More on Environments, ApplicationSets & Multi-Cluster
You need to deploy the same app to dev, staging and prod namespaces with different values. Design it with an ApplicationSet.IntermediateA new prod cluster comes online every month. How do you make sure it gets all standard add-ons automatically?IntermediateA matrix ApplicationSet (clusters times apps) generated 300 Applications, but a bad commit to one app's chart broke all prod clusters at once. How do you redesign for safer rollouts?AdvancedYou want preview environments for every pull request on the app repo. How do you do it with Argo CD?IntermediateSome clusters need a different version of an add-on than the rest. How do you handle exceptions without duplicating ApplicationSets?AdvancedHow would you register 50 EKS clusters with Argo CD securely, without long-lived tokens?Advanced