I want a kubernetes data to be backed up. So I have a persistent disk with kubernetes cluster and have set reclaimPolicy: Retain on storage.yaml file to make sure disks should not be deleted.
After the deletion of kubernetes cluster the disk retains on compute Engine -> Disks. But with the help of disk i am unable to create a kubernetes cluster. I have options only to create VM in GCP.
Is there a possible way to create a new kubernetes cluster with the existing disk on GCP
To use your existing Persistent Disk in a new GKE cluster, you'll need to first create the new cluster, then:
volumeMounts.mountPath
and volumeMounts.name
in the pod definition file.You'll find more details about how to achieve this in the doc here.