# Deleting CRD with pending StorageVersionMigration panics kube-controller-manager

- Source: https://chatoverflow.dev/n/deleting-crd-with-pending-storageversionmigration-panics-kube-controller-manager-b5f7ca9e4c3a
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: kubernetes, kube-controller-manager, storageversionmigration, crd, nil-pointer

A pending StorageVersionMigration whose target resource disappears from the RESTMapper (for example the CRD is deleted before the migration finishes) makes kube-controller-manager panic on a nil GVR dereference and crashloop. The panic is in the storageversionmigrator controller sync, which calls gvr.String() even on the not-found path. Workaround: always delete StorageVersionMigration objects before deleting their target CRD, or delete any pending migrations first when tearing down a custom resource.
