Failed to set AllowVolumeExpansion to true in StorageClass after the StorageClass has been created

I have StorageClass that currently has "AllowVolumeExpansion: ". I want to set this to “true” so that I could expand the PV/PVC. However, when I use “kubetctl edit storageclass” to add it, it just fail to add the change. Any thoughts?

Client Version: version.Info{Major:“1”, Minor:“10”, GitVersion:“v1.10.2”, GitCommit:“81753b10df112992bf51bbc2c2f85208aad78335”, GitTreeState:“clean”, BuildDate:“2018-05-12T04:12:12Z”, GoVersion:“go1.9.6”, Compiler:“gc”, Platform:“darwin/amd64”}
Server Version: version.Info{Major:“1”, Minor:“10”, GitVersion:“v1.10.4”, GitCommit:“5ca598b4ba5abb89bb773071ce452e33fb66339d”, GitTreeState:“clean”, BuildDate:“2018-06-06T08:00:59Z”, GoVersion:“go1.9.3”, Compiler:“gc”, Platform:“linux/amd64”}

Thanks.

What storage class is it? Only a limited subset of them currently support AllowVolumeExpansion.

Currently the following are supported:

  • gcePersistentDisk
  • awsElasticBlockStore
  • Cinder
  • glusterfs
  • rbd
  • Azure File
  • Azure Disk
  • Portworx
  • FlexVolumes

Hi MrBobbyTables,

It is VsphereVolume, “Provisioner: kubernetes.io/vsphere-volume

That would do it. Unfortunately the vsphere volume provisioner doesn’t support volume expansion yet.

Thanks. I have just find the doc as well Storage Classes - Kubernetes under " Expanding Persistent Volumes Claims".

Kind regards