<p>When creating PVC with storage class as <code>allowvolumeexpansion: true</code> in k8s, how will it work with a Pod?</p>
<p>When creating 10 Gb later and trying to extend the PVC with 15 Gb, how will it work along with component PV PVC Pod in real-time? Since when I am trying with a PVC, it is not extended as expected.</p>
<p>Could you help me to identify the logic behind this? Because the docs refer to extending the PVC. But I am not sure how is it applicable to the PV (source).</p>

Jaikumar Selvaraj
<p>Welcome to the community!</p>
<p>Feature <code>allowVolumeExpansion</code> was introduced in kubernetes 1.11 version and it works only with specific volume types.</p>
<p>Types of volumes supported:</p>
<ul>
<li>gcePersistentDisk</li>
<li>awsElasticBlockStore</li>
<li>Cinder</li>
<li>glusterfs</li>
<li>rbd</li>
<li>Azure File</li>
<li>Azure Disk</li>
<li>Portworx</li>
<li>FlexVolumes</li>
<li>CSI</li>
</ul>
<p>(This can be found here - <a href="https://kubernetes.io/docs/concepts/storage/storage-classes/#allow-volume-expansion" rel="nofollow noreferrer">Allow Volume Expansion</a>)</p>
<p>As you mentioned storage class should have this field set to <code>true</code>, once this is done, Persistent Volume Claim will trigger the volume expansion.</p>
<p>How this works in practice. Once you corrected PVC to increase a volume size, it will be reflected within your PVC and new condition <code>FileSystemResizePending</code>will be added.
You can check it with</p>
<p><code>kubectl get pvc &lt;your_pvc_name&gt; -o yaml</code></p>
<p>To get PV size actually changed, pod restart is required. This can be achieved by deleting the pod or triggering scaling down and up in your deployment.</p>
<p>All related details you can find here: <a href="https://kubernetes.io/blog/2018/07/12/resizing-persistent-volumes-using-kubernetes/" rel="nofollow noreferrer">Resizing Persistent Volumes using Kubernetes</a></p>
