pod has unbound intermediate access persistnt volumeclaim:PVC
Problem Description:
I have created the persistent volume and define the some access modes as shown below
I am having the setup like persistent volume and persistent volume claim , So created the deployment for the below scripts
pv scipt
apiVersion: v1
kind: PV
metadata:
name: pv_name
spec:
capacity:
storage: 1Gi
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
storageClassName: local-storage
local:
path: /mnt/disks/ssd1
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- node1
PVC script
apiVersion: v1
kind: PVC
metadata:
name: PVC_name
spec:
volumeName: PVC_demo-name
storageClassName: local-storage
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
After deploying when i check my volume status it is pending and when i describe my logs it is showing the below error
Warning FailedScheduling <unknown> default-scheduler running <VolumeBinding> filter plugin for pod <Pod_name>: pod has unbound immediate PersistentVolumeClaims
when check some realted Github link it is showing related grafana, but i am not using any grafan configuration
What this error mean, any idea or help?
What this error mean, am i need to add any script to resolve this issue, any idea or help?
Solution – 1
I tried to reproduce the same issue in my environment and got the below results
I have created the deployment for persistent volume and volume claim
We will get this error if the both access modes are different
When I check my status it is pending
I use the below command and got the same error(warning)
While creating the PV and PVC I have defined the two access modes one is for ReadWriteOnce and ReadWriteMany
Because of these different accesses Kubernetes cluster will end up with this error
To resolve this issue I have deleted the the entire persistent volumes and created again with the same access mode
PV script:
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
PVC script:
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
resources:
requests:
I have recreated the deployment and when I check my status its bound got success
kubectl apply/create -f filename
kubectl get pvc
When I describe my logs I am not getting any error as shown below