After the PVC is deleted the associated PV still shows the claim. This might be expected behavior, but for my usecase it must turn to "Available" status again. When I remove the claim object in the PV manifest by hand, it can be claimed by a different pod again. This is what I wanted.
CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM 10Gi RWO Retain Released arc-runners/k8s-runner-set-5tsbc-runner-qpz97-runner-cache CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM 10Gi RWO Retain Available Is there an option to so in a proper k8s manner?
More context:
In the pod spec I'm using ephemeral volumeClaimTemplate. I'm forced to do so because I need to integrate it to this helm chart. Here is the helm/values.yaml where the pod spec can be overridden.
... volumes: - name: runner-cache ephemeral: volumeClaimTemplate: spec: accessModes: [ "ReadWriteOnce" ] storageClassName: "cache-dir-dispatcher" resources: requests: storage: 10Gi I got multiple static defined volumes like this
apiVersion: v1 kind: PersistentVolume metadata: name: github-runner-slot1-pv labels: type: local spec: persistentVolumeReclaimPolicy: Retain storageClassName: cache-dir-dispatcher ... It claims properly till every PV is in the "Released" status. Once I delete the claim entry in the manifest of the PV, it turns to "Available" again which is working well.