Sheshnarayan Patel (TATA CONSULTANCY SERVICES LTD) 0 Reputation points Microsoft Vendor

250 Gb disk mounted to old node pool, but it stuck there without being delete when rotating node pool.. We simply need to delete it, but the bottom is dimmed

Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
1,841 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Dillon Silzer 54,281 Reputation points

    Hi Sheshnarayan,

    Have you tried using PowerShell to delete the disk?

    Find and delete unattached Azure managed and unmanaged disks



    Find the disk you want deleted, and use the following command to delete it:

    $disktoRemove = Remove-AzDisk -Force

    If this is helpful please accept answer.

    0 comments No comments

  2. Anveshreddy Nimmala 1,985 Reputation points Microsoft Vendor

    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.


    0 comments No comments