According to the documentation when deleting a cluster the persistent disk will still exist(https://cloud.google.com/kubernetes-engine/docs/how-to/deleting-a-cluster). I wanna delete all the associate persistent disks when deleting cluster but I don't know the name/id of persistent disk. Cluster get API doesn't have any information about the disks and nodes.
resp, err := containerService.Projects.Zones.Clusters.Get(project, zone, cluster).Context(ctx).Do()
Cloud SDK can be used to identify the disks if the proper filter and format are parse
i.e.
To list all the disks being used by a GKE (you can change the filter at your convenience)
To list only disks used as PVC
This last command will list detached PVC disks
To ensure a detached disk is not in use by a cluster, here's a kubectl command to list a cluster's PVs and their GCE PD:
The corresponding API method is disks.list