Hello Sheshnarayan Patel (TATA CONSULTANCY SERVICES LTD),You need to identify the Persistent Volume (PV) and Persistent Volume Claim (PVC) that are using the disk.
Use kubectl to list PVs and PVCs and find the ones associated with your disk.
kubectl get pv
kubectl get pvc --all-namespaces
If the PV was not automatically deleted after removing the PVC, you might need to manually delete the PV.
kubectl delete pvc <PVC_NAME> -n <NAMESPACE>
Deleting the PV does not delete the underlying disk in Azure, and you need to make sure the data is not needed.
kubectl delete pv <PV_NAME>
you may need to manually detach it from the node in the Azure portal or using Azure CLI, especially if it was attached outside of Kubernetes' management
Using Azure CLI to Detach the Disk.
az vm disk detach --resource-group <ResourceGroupName> --vm-name <VMName> --name <Disk Name>
Delete the Disk Using Azure CLI.
az disk delete --name <DiskName> --resource-group <ResourceGroupName> --yes --no-wait
Hope this helps you.If an answer has been helpful, please consider accepting the answer to help increase visibility of this question for other members of the Microsoft Q&A community. If not, please let us know what is still needed in the comments so the question can be answered. Thank you for helping to improve Microsoft Q&A.
