To resolve persistentvolumes "xxxxxx" is forbidden: error querying GCE PD volume xxxx: disk is not found on GCP (google cloud)
apiVersion: v1
kind: PersistentVolume
metadata:
name: pv1
spec:
accessModes:
- ReadWriteOnce
storageClassName: ssd
capacity:
storage: 20Gi
persistentVolumeReclaimPolicy: Retain
gcePersistentDisk:
pdName: mydisk
First, List your disks and make sure "pdName" matches with your disk name
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6etMVV3GWfo5xlfikssADlHTiKm80c35hZ34-tiviofHYwRhYFgWdKgtsNSUwHRaEsvcL2-_d4129aqOFhlTKBZj_WEhaouryffwSYSb-4OOrvstkHZFuiK3GSzr1RtBkpk05oeu7xH0u/s640/gcloud1.jpg)
Second, make sure your Google Kubernetes Engine (GKE) and Disk are provisioned in the same region
Comments