Попытка статически выделить PV с хранилищем GCP SSD.Выводится сообщение об ошибке:
The PersistentVolume "monitoring" is invalid: spec: Required value: must specify a volume type
Шаги для воспроизведения:
$ 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
Версия Kubernetes:
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"}