Trying to expand a PVC got warning:
Ignoring the PVC: didn't find a plugin capable of expanding the volume; waiting for an external controller to process this PVC.
Create a PVC of 1Gi size:
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: myclaim
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storageClassName: nfs-client
EOF
Check that pvc, it's successfully bound:
$ kubectl get pvc myclaim
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
myclaim Bound pvc-6ef8eda2-efb5-11e9-9bef-005056bd0410 1Gi RWO nfs-client 8s
$ kubectl describe pvc myclaim
...
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Provisioning 61s cluster.local/nfs-client-provisioner_nfs-client-provisioner-58487c669c-jjqpq_a9da7c7e-ec08-11e9-9af1-2228a80fe4ad External provisioner is provisioning volume for claim "default/myclaim"
Normal ExternalProvisioning 61s (x2 over 61s) persistentvolume-controller waiting for a volume to be created, either by external provisioner "cluster.local/nfs-client-provisioner" or manually created by system administrator
Normal ProvisioningSucceeded 61s cluster.local/nfs-client-provisioner_nfs-client-provisioner-58487c669c-jjqpq_a9da7c7e-ec08-11e9-9af1-2228a80fe4ad Successfully provisioned volume pvc-6ef8eda2-efb5-11e9-9bef-005056bd0410
Try to expand PVC to size of 2Gi:
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: myclaim
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Gi
storageClassName: nfs-client
EOF
Check it, and it's still size of 1Gi:
$ kubectl get pvc myclaim
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
myclaim Bound pvc-6ef8eda2-efb5-11e9-9bef-005056bd0410 1Gi RWO nfs-client 2m37s
Check the events:
$ kubectl describe pvc myclaim
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Provisioning 4m14s cluster.local/nfs-client-provisioner_nfs-client-provisioner-58487c669c-jjqpq_a9da7c7e-ec08-11e9-9af1-2228a80fe4ad External provisioner is provisioning volume for claim "default/myclaim"
Normal ExternalProvisioning 4m14s (x2 over 4m14s) persistentvolume-controller waiting for a volume to be created, either by external provisioner "cluster.local/nfs-client-provisioner" or manually created by system administrator
Normal ProvisioningSucceeded 4m14s cluster.local/nfs-client-provisioner_nfs-client-provisioner-58487c669c-jjqpq_a9da7c7e-ec08-11e9-9af1-2228a80fe4ad Successfully provisioned volume pvc-6ef8eda2-efb5-11e9-9bef-005056bd0410
Warning ExternalExpanding 19s volume_expand Ignoring the PVC: didn't find a plugin capable of expanding the volume; waiting for an external controller to process this PVC.
BTW Storage class enabled expansion:
$ kubectl get storageclasses.storage.k8s.io -o nfs-client
allowVolumeExpansion: true
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
creationTimestamp: "2019-10-12T09:19:04Z"
labels:
app: nfs-client-provisioner
chart: nfs-client-provisioner-1.2.6
heritage: Tiller
io.cattle.field/appId: nfs-client-provisioner
release: nfs-client-provisioner
name: nfs-client
resourceVersion: "4010231"
selfLink: /apis/storage.k8s.io/v1/storageclasses/nfs-client
uid: 55e63667-ecd1-11e9-9bef-005056bd0410
parameters:
archiveOnDelete: "false"
provisioner: cluster.local/nfs-client-provisioner
reclaimPolicy: Delete
volumeBindingMode: Immediate
Yes, the nfs-client-provisioner is not capable of expanding volumes. In fact, it does not enforce the size of volumes at all, so a PV that says 1Gi may in fact have contain/write more than 1Gi of data in its path. AFAIK, there is no standard quota/limit mechanism for NFS. Apologies if this is not clear.
I got it, thanks
Most helpful comment
Yes, the nfs-client-provisioner is not capable of expanding volumes. In fact, it does not enforce the size of volumes at all, so a PV that says 1Gi may in fact have contain/write more than 1Gi of data in its path. AFAIK, there is no standard quota/limit mechanism for NFS. Apologies if this is not clear.