json: cannot unmarshal string into Go struct field StorageClass.allowVolumeExpansion of type bool

Viewed 23

I'm trying to apply the configuration from this post: https://stackoverflow.com/a/73757992/1103606

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: managed-nfs-ssd # set this value
provisioner: k8s-sigs.io/nfs-subdir-external-provisioner # or choose another name, must match deployment's env PROVISIONER_NAME'
parameters:
  archiveOnDelete: "true" # value of true means retaining data upon pod terminations
allowVolumeExpansion: "true" # this attribute doesn't exist by default

But when I try to apply it I get:

kubernetes@kubernetes1:~/nfs-dynamic-provisioner/nfs-subdir-external-provisioner/deploy$ kubectl  create -f class.yaml
Error from server (BadRequest): error when creating "class.yaml": StorageClass in version "v1" cannot be handled as a StorageClass: json: cannot unmarshal string into Go struct field StorageClass.allowVolumeExpansion of type bool

Do you know how I can fix this issue?

0 Answers
Related