Unresolved PersistentVolumeClaim reference in container

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

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

Examples

kind: Deployment spec: template: spec: volumes: - name: data persistentVolumeClaim: claimName: test-minio # Missing PersistentVolumeClaim ...
apiVersion: v1 kind: PersistentVolumeClaim metadata: name: my-minio # Different name spec: storageClassName: ssd accessModes: - ReadWriteOnce resources: requests: storage: 3Gi

Resolution

  • Check if the PersistentVolumeClaim is present in the same namespace.
  • Check if the PersistentVolumeClaim is present in a different namespace. Kubevious Search can be a very handy tool to find PersistentVolumeClaims across namespaces. You cannot mount a PersistentVolumeClaim from a different namespaces. In that case you would need to create a PersistentVolumeClaim in namespace where the workload resides.
  • Did you make a typo in the workload volume spec? Kubevious Search uses fuzzy logic to return results and can help with finding the correct PersistentVolumeClaim.
  • Correct the persistentVolumeClaim in the workload volume spec.
  • 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