Persistent Volume is in a "released" State and Failing to Mount Within the Pod

Problem

You deleted an existing PersistentVolumeClaim and are trying to mount the PersistentVolume to another pod but it is failing to mount. The volume is observed to be in a "released" state as seen below.

Javascript
Copy

Environment

  • Platform9 Managed Kubernetes - All Versions

Cause

When the PersistentVolumeClaim is deleted, the PersistentVolume still exists and the volume is considered "released". But it is not yet available for another claim because the previous claimant's data remains on the volume.

Resolution

  1. Describe the PersistentVolume and check the ClaimRef. You will see that it is referring to the older PersistentVolumeClaim (old-claim in this case) that has already been deleted.
Javascript
Copy
  1. Delete the old ClaimRef by running the following command.
Javascript
Copy
  1. Describe the PersistentVolume again and validate that the ClaimRef has been reset.
Javascript
Copy
  1. Validate the status of the PersistentVolume.
Javascript
Copy
  1. Now that the PersistentVolume is in an Available status, it can be mounted to any other pod.
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard