When you delete storage policies in vCenter, they continue to appear as storage classes in the Supervisor cluster.
Additionally, namespaces report validation errors: Failed to validate storage policy ####-####-####-#### with SPBM service
vSphere 8.x
You deleted the storage policy in vCenter before un-mapping it from the associated namespaces.
This sequence leaves stale resource quotas and storage class entries within the Supervisor cluster that still reference the non-existent policy.
To clear the stale entries and resolve the namespace errors, follow these steps:
kubectl get resourcequota -n <namespace-name>Verify Storage Class Usage Ensure that no Persistent Volume Claims (PVCs) are actively using the stale storage classes: kubectl get pvc -A -o wide | grep -i <storage-class-name>
Delete Stale Resource Quotas Remove the resource quota that points to the deleted policy: kubectl delete resourcequota <quota-name> -n <namespace-name>
Assign Valid Storage Policies Map a valid, existing storage policy to the namespace through the vSphere Client. This action resolves the "Failed to validate" status messages.
Remove Stale Storage Classes Manually delete the storage classes that no longer have a backing policy in vCenter: kubectl delete storageclass <storage-class-name>
Note: To prevent this issue in the future, you must always un-map storage policies from all namespaces before deleting them from vCenter.