kind: SomeCustomKind
name: instance

In order to implement idempotent resources deletion:

As kubectl supports safe delete for non existing resources

kubectl delete -f instance.yaml --ignore-not-found

is it possible to ignore the same way delete operation if SomeCustomKind crd is not installed (or yet already deleted) it self.

Or at least if there's a batch specification


kind: KindA
name: a
kind: kindB
name: b

is there a way to produce something like that

cat batch.yaml | <skip non existing kinds> | kubectl delete -f - --ignore-not-found

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.