diff --git a/src/utils/shared/k8s/delete.go b/src/utils/shared/k8s/delete.go index 046b6cde570..c9728f78c32 100644 --- a/src/utils/shared/k8s/delete.go +++ b/src/utils/shared/k8s/delete.go @@ -185,6 +185,13 @@ func (o *ObjectDeleter) runDelete(r *resource.Result) (int, error) { if err != nil { return err } + // In newer versions of k8s, the resource name can be empty. This causes + // the delete to fail since it can't watch for the resource. See + // https://github.com/pixie-io/pixie/issues/2029 for more details. + if info.Name == "" { + log.Debugf("Skipping resource with empty name: %+v\n", info) + return nil + } deletedInfos = append(deletedInfos, info) found++