Required value: must specify a volume type when statically provisioning PV
No need to create Storage Class, just correct your requirements
see my file, Here HostPath is added.
apiVersion: v1
kind: PersistentVolume
metadata:
name: log-volume
labels:
type: local
spec:
storageClassName: manual
capacity:
storage: 1Gi
accessModes:
- ReadWriteMany
hostPath:
path: "/opt/volume/nginx"
and PVC as
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: log-claim
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 200Mi
storageClassName: manual
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:
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: my-retain-ssd-storage
namespace: default
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 50Gi
storageClassName: ssd