Failed to Validate Storage Policy With SPBM Service After Deletion
book
Article ID: 433787
calendar_today
Updated On:
Products
VMware vSphere Kubernetes Service
Issue/Introduction
When storage policies are deleted in vCenter, they continue to appear as storage classes in the Supervisor cluster. Additionally, vSphere namespaces report the following validation error: Failed to validate storage policy <UUID> with SPBM service.
Environment
VMware vSphere Kubernetes Service
Cause
The storage policy was deleted in vCenter Server before being unmapped 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.
Resolution
Identify stale resource quotas in the affected namespace that reference the deleted storage policy: kubectl get resourcequota -n <namespace-name>
Verify 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 the stale resource quota that points to the deleted policy: kubectl delete resourcequota <quota-name> -n <namespace-name>
Map a valid, existing storage policy to the namespace through the vSphere Client. This action resolves the "Failed to validate" status messages.
Manually delete the storage classes that no longer have a backing policy in vCenter: kubectl delete storageclass <storage-class-name>
To clear the validation error from the vSphere Client UI, trigger a refresh by un-assigning and then re-assigning a valid storage policy to the affected namespaces through the vSphere Client.
Additional Information
To prevent this issue in the future, always un-map storage policies from all namespaces before deleting them from vCenter.
In case of multiple Storage Class, verify the corresponding Storage Policies have been deleted from the vCenter Server, else users may face issue while upgrading the Supervisor: VKS Supervisor upgrade failure due to missing StorageClass