What is default value for allowVolumeExpansion on the default storage class in kubernetes?

1/6/2022

What is the default value for the allowVolumeExpansion? I create my volumes through a statefulset from apiVersion: apps/v1 volumeClaimTemplates In the case that the answer is false, how can I change it to true?

Potentially relevant info: the cluster running on GKE autopilot.

-- Alex Skotner
google-kubernetes-engine
kubernetes
kubernetes-pvc

1 Answer

1/6/2022

You can find out by looking into the StorageClass that your claim is using kubectl describe StorageClass <name>

volumeClaimTemplates:
- ...
  spec:
    storageClassName: <name>  # <-- check using this name

Recent version of GKE the default is true. More about this field can be found here.

-- gohm&#39;c
Source: StackOverflow