This message was deleted.
# longhorn-storage
a
This message was deleted.
q
all those resources are *.longhorn.io crds.
like backups, volume, engine etc...
I can't change the finalizers on those resources somehow.
probably because there is no longhorn stuff anymore in the cluster...
for example
Copy code
error: volumeattachments.longhorn.io "pvc-057dbf6d-cdbc-417b-b743-a73a85a49d42" could not be patched: Internal error occurred: failed calling webhook "mutator.longhorn.io": failed to call webhook: Post "https://longhorn-admission-webhook.longhorn-system.svc:9502/v1/webhook/mutation?timeout=10s": service "longhorn-admission-webhook" not found
I finally did it I believe.... I had to delete the mutating and validating hooks created by longhorn. Then I was able to change the finalizers of all the remaining resources in the namespace...
Copy code
k delete validatingwebhookconfigurations.admissionregistration.k8s.io longhorn-webhook-validator

k delete mutatingwebhookconfigurations.admissionregistration.k8s.io longhorn-webhook-mutator

for type in $(kubectl api-resources --namespaced=true --verbs=delete -o name | grep longhorn); do echo $type; for res in $(kubectl get $type -o name); do kubectl patch $res -p '{"metadata":{"finalizers":[]}}' --type=merge; done; done;
that's what it took to clean up my own mess...
126 Views