Unresolved PersistentVolume reference in the volume claim

An existing PersistentVolume can be bound to PersistentVolumeClaim using volumeName property. This validator detects a condition when a PersistentVolume referenced in PersistentVolumeClaim is not found.

Affected Resources: PersistentVolumeClaim

Example

apiVersion: v1 kind: PersistentVolumeClaim spec: resources: requests: storage: 8Gi volumeMode: Filesystem volumeName: pvc-00000000-0000-0000-0000-000000000000 # PV not found accessModes: - ReadWriteOnce storageClassName: gp2

Resolution

  • Check if the PersistentVolume exists.
  • Make correction in PersistentVolumeClaim.
  • It is possible that the PersistentVolume was deleted and cannot be recovered. In such a case, the volumeName property should be removed from the PersistentVolumeClaim, allowing the control plane to create a new PV.
  • Need other validation rules?

    Please let us know if there are other built-in validation rules you would like to see in Kubevious to detect misconfigurations and violations to best practices. Optionally, you can provide your details so we can reach out to you with follow-up questions.

    Share this article on:
    message