PersistentVolumeClaim not attached

PersistentVolumeClaims allow mounting permanent storage volumes to workloads. This validator detects a condition when a PersistentVolumeClaim is not used or referenced from workloads.

Affected Resources: Deployment, DaemonSet, StatefulSet, CronJob, Job, ReplicaSet, Pod

Example

apiVersion: v1 kind: PersistentVolumeClaim metadata: name: my-minio # This PVC is not used ...

Resolution

  • Check if the workloads were removed, and the PVC should also be deleted.
  • Check if there was a typo in the workload volume spec.
  • Resolution Example

    kind: Deployment spec: template: spec: volumes: - name: data persistentVolumeClaim: claimName: test-minio # Fix the claimName ...

    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