<p>Trying to statically provision a PV with GCP SSD storage. Errors out with the following message:</p>

<pre><code>The PersistentVolume "monitoring" is invalid: spec: Required value: must specify a volume type
</code></pre>

<p>Steps to reproduce:</p>

<pre><code>$ cat storage.yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: ssd
provisioner: kubernetes.io/gce-pd
parameters:
  type: pd-ssd
reclaimPolicy: Retain


$ kubectl apply -f storage.yaml
storageclass.storage.k8s.io/ssd created


$ cat pv.yaml
apiVersion: v1
kind: PersistentVolume
metadata:
  name: monitoring
spec:
  storageClassName: ssd
  capacity:
    storage: 50Gi
  persistentVolumeReclaimPolicy: Retain
  accessModes:
    - ReadWriteOnce


$ kubectl apply -f pv.yaml
The PersistentVolume "monitoring" is invalid: spec: Required value: must specify a volume type
</code></pre>

<p>Kubernetes version:</p>

<pre><code>Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.1", GitCommit:"b7394102d6ef778017f2ca4046abbaa23b88c290", GitTreeState:"clean", BuildDate:"2019-04-08T17:11:31Z", GoVersion:"go1.12.1", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"12+", GitVersion:"v1.12.6-gke.10", GitCommit:"aaf0906400b5fc1d858ce0566a571e4f3ed06b9f", GitTreeState:"clean", BuildDate:"2019-03-30T19:30:48Z", GoVersion:"go1.10.8b4", Compiler:"gc", Platform:"linux/amd64"}
</code></pre>

<p>If using a provisioner, you usually don't create the PV on your own. Just create a PVC requiring that created storage class and GKE will provide the PV with the requested storage size and kind for you:</p>

<pre><code>kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: my-retain-ssd-storage
  namespace: default
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 50Gi
  storageClassName: ssd
</code></pre>
