kubernetes GCP Persistent Volumes and "disk is not found on GCP (google cloud)" error


To resolve persistentvolumes "xxxxxx" is forbidden: error querying GCE PD volume xxxx: disk is not found on GCP (google cloud)

apiVersionv1
kindPersistentVolume
metadata:
  namepv1
spec:
  accessModes:
  - ReadWriteOnce
  storageClassNamessd
  capacity:
    storage20Gi
  persistentVolumeReclaimPolicyRetain
  gcePersistentDisk:
    pdNamemydisk


First, List your disks and make sure "pdName" matches with your disk name



Second, make sure your Google Kubernetes Engine (GKE) and Disk are provisioned in the same region




Comments