# gcePersistentDisk is not working in Kubernetes on Google Cloud

**URL:** <https://discuss.kubernetes.io/t/gcepersistentdisk-is-not-working-in-kubernetes-on-google-cloud/7628>\
**Category:** General Discussions\
**Created:** [August 22, 2019, 12:17pm UTC](https://discuss.kubernetes.io/t/gcepersistentdisk-is-not-working-in-kubernetes-on-google-cloud/7628 "2019-08-22T12:17:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![HarpartapSingh](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/harpartapsingh/32/3532_2.png) [@HarpartapSingh](https://discuss.kubernetes.io/u/HarpartapSingh)\
**Post date:** [August 22, 2019, 12:17pm UTC](https://discuss.kubernetes.io/t/gcepersistentdisk-is-not-working-in-kubernetes-on-google-cloud/7628/1 "2019-08-22T12:17:31Z")

</div>

I am using `gcePersistentDisk` as volume in `kubernetes` . Currently all my VM , Disks are on under same availability zone and account of `google cloud` . But still `gcePersistentDisk` is not mounting. Below is my deployment , Volume and Storage files :-

```
   apiVersion: apps/v1 
kind: Deployment
metadata:
  name: apache-service
spec:
  selector:
    matchLabels:
      app: apache
  replicas: 1 
  template:
    metadata:
      labels:
        app: apache
    spec:
     volumes:
      - name: service-pv-storage
        gcePersistentDisk:
          pdName: nfs-disk
          fsType: ext4  
     containers:
      - name: apache
        image: mobingi/ubuntu-apache2-php7:7.2
        ports:
        - containerPort: 80
        volumeMounts:
        - mountPath: "/var/www/html"
          name: service-pv-storage

---
apiVersion: v1
kind: Service
metadata:
  name: apache-service
spec:
  selector:
    app: apache
  ports:
  - protocol: TCP
    port: 80
    targetPort: 80
    nodePort: 30751
  type: NodePort

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: nfs-pvc
spec:
  accessModes:
    - ReadWriteOnce
  storageClassName: ssd-sc
  resources:
    requests:
      storage: 10Gi

---
apiVersion: v1
kind: PersistentVolume
metadata:
  name: nfs-pv
spec:
  storageClassName: ssd-sc
  capacity:
    storage: 10Gi
  accessModes:
    - ReadWriteOnce
  gcePersistentDisk:
    pdName: nfs-disk
    fsType: ext4

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: ssd-sc 
provisioner: kubernetes.io/gce-pd
reclaimPolicy: Retain # Retain storage even if we delete PVC
parameters:
  type: pd-ssd

```

## When i am using this deployment it give me following error on pod descriptions.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/kubernetes/original/2X/7/7b9f357573fdf8f0d935f66f015dbee22b5ea87c.png)

Note :- I am not using `kubernetes` google engine. I have setup my custom cluster.
