How to prevent resizing of Fileshare when PVC is deleted

TMU-5700 0 Reputation points
2023-11-09T19:47:40.83+00:00

We are running a stateful application on AKS and required persistent volume. PVC will be shared by multiple pods.

We are using Azure Files premium over NFS for Dynamic PVs. The PVCs are defined with 'ReclaimPolicy: Retain' and AccessModes as 'ReadWriteMany'.

Whenever we delete the PVC it triggers a resize in PV share, the share decrease to the size specified for another PVC in the same PV.

Further, creating a new PVC with size higher than PV share size - doesn't trigger auto increase.

Azure Files
Azure Files
An Azure service that offers file shares in the cloud.
1,425 questions
Azure Kubernetes Service
Azure Kubernetes Service
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,457 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Amira Bedhiafi 33,866 Reputation points Volunteer Moderator
    2023-11-12T17:59:31.7366667+00:00

    You mentioned that the PVCs are defined with ReclaimPolicy: Retain. This policy ensures that the underlying physical storage is not automatically deleted when the PVC is deleted. However, this policy does not control the resizing behavior of the Fileshare, so check this old thread : https://github.com/kubernetes/kubernetes/issues/88683

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.