Topics covered in this article:
Problem Statement
Local PV is not bound on a node while checking kubectl get pvc -n <namespace>
Example command:
kubectl get pvc -n default
Example output:
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
minio-pv-claim Pending openebs-hostpath 12s
OpenEBS version
0.9.0 and above
OpenEBS Storage engine
Local PV
Possible Reason
OpenEBS local PV will not be bound until the application pod is scheduled as its volumeBindingMode
is set to WaitForFirstConsumer
.
Example output of kubectl describe pvc minio-pv-claim
Name: minio-pv-claim
Namespace: default
StorageClass: openebs-hostpath
Status: Pending
Volume:
Labels: app=minio-storage-claim
Annotations: kubectl.kubernetes.io/last-applied-configuration:
{"apiVersion":"v1","kind":"PersistentVolumeClaim","metadata":{"annotations":{},"labels":{"app":"minio-storage-claim"},"name":"minio-pv-cla...
Finalizers: [kubernetes.io/pvc-protection]
Capacity:
Access Modes:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal WaitForFirstConsumer 15s (x9 over 2m11s) persistentvolume-controller waiting for first consumer to be created before binding
Mounted By: <none>
Solution
Once the application pod is scheduled on a certain node, OpenEBS local persistent volume will be bound on that node.