A custom resource is stuck in Terminating. Why?
AdvancedScenarioHelm, operators and GitOps
Answer
Situation read → kubectl delete hangs on a custom resource.
What I'd do →
kubectl get cr x -o yamland inspectmetadata.finalizersanddeletionTimestamp- The operator is expected to remove the finalizer after cleanup
- Check whether the operator is running:
kubectl get pods -n operators - Fix the operator and let it finish cleanup
- Last resort:
kubectl patch cr x --type=merge -p '{"metadata":{"finalizers":[]}}'knowing external resources may leak
Why → A finalizer holds the object until its controller completes cleanup.
Interview tip → Say you patch finalizers only after confirming what cleanup is skipped.
More on Helm, operators and GitOps
A `helm upgrade` failed halfway. How do you see state and recover?BeginnerHelm says `cannot re-use a name that is still in use` or `another operation is in progress`. What now?IntermediateHow do you review what a Helm upgrade will change before running it?IntermediateWhere do you keep chart values for multiple environments?BeginnerWhat does `helm template` do and how is it different from `helm install`?BeginnerA Helm chart upgrade changed an immutable field and failed. How do you proceed?Advanced