CodexBloom - Programming Q&A Platform

Kubernetes Persistent Volume Claim Not Binding Due to StorageClass Mismatch - Seeking Resolution

👀 Views: 8130 đŸ’Ŧ Answers: 1 📅 Created: 2025-07-24
kubernetes pvc pv aws storage yaml

Can someone help me understand I've looked through the documentation and I'm still confused about I've been researching this but I'm working with an scenario with my Persistent Volume Claim (PVC) not binding to any Persistent Volume (PV) in my Kubernetes cluster. I am using Kubernetes version 1.23 and my storage backend is AWS EBS. Despite creating a PVC with the appropriate specifications, it remains in a 'Pending' state with the following events: ``` Warning FailedBinding persistentvolume-controller no persistent volumes available for this claim and no storage class is set ``` Here is the YAML configuration for my PVC: ```yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: name: my-pvc spec: accessModes: - ReadWriteOnce resources: requests: storage: 10Gi storageClassName: my-storage-class ``` I have also created a Persistent Volume with the following configuration: ```yaml apiVersion: v1 kind: PersistentVolume metadata: name: my-pv spec: capacity: storage: 10Gi accessModes: - ReadWriteOnce awsElasticBlockStore: volumeID: "aws://us-east-1a/vol-12345678" fsType: ext4 persistentVolumeReclaimPolicy: Retain storageClassName: my-storage-class ``` Both the PV and PVC specify the same `storageClassName`, but the PVC still fails to bind. I've verified that my AWS credentials and IAM roles are correctly configured for the EBS volumes. I've tried removing and recreating both the PVC and PV, ensuring that there are no typos in the names or class specifications. I also checked the available PVs using: ``` kubectl get pv ``` And the output shows my PV as available. However, when I check the PVC status, it remains pending. I'm not sure if I'm missing a specific configuration or if there's a deeper scenario with my EBS setup. Any insights on what might be causing this binding scenario would be greatly appreciated! I'm on Windows 10 using the latest version of Yaml. The stack includes Yaml and several other technologies. Could someone point me to the right documentation?