A FluxCD Kustomization resource has 'prune: false' but you notice old resources are deleted. What might be wrong?
medium📝 Troubleshoot Q7 of 15
Kubernetes - Advanced Deployment Patterns
A FluxCD Kustomization resource has 'prune: false' but you notice old resources are deleted. What might be wrong?
AFluxCD ignores the prune setting by default
BAnother Kustomization with prune enabled is managing the same resources
CThe GitRepository source is invalid causing unexpected behavior
DPrune only works with HelmReleases, not Kustomizations
Step-by-Step Solution
Solution:
Step 1: Understand prune behavior
Prune removes resources not in manifests. If prune is false but resources are deleted, another Kustomization with prune true might manage those resources.
Step 2: Evaluate other options
FluxCD respects prune setting, invalid GitRepository causes sync failure but not pruning, and prune applies to Kustomizations as well as HelmReleases.
Final Answer:
Another Kustomization with prune enabled manages same resources -> Option B
Quick Check:
Conflicting prune settings cause unexpected deletes [OK]
Quick Trick:Check for overlapping Kustomizations with prune enabled [OK]
Common Mistakes:
Assuming FluxCD ignores prune setting
Not checking for multiple Kustomizations managing same resources
Confusing prune behavior between resource types
Master "Advanced Deployment Patterns" in Kubernetes
9 interactive learning modes - each teaches the same concept differently