Can Kubernetes PV configured to use max size

5/10/2017

Have NFS configured as Persistent volume in Kubernets. Is there an option to specify entire size of the volume.

apiVersion: v1
kind: PersistentVolume
metadata:
  name: nfs
spec:
  capacity:
    storage: 1Mi
  accessModes:
    - ReadWriteMany
  nfs:
    server: 10.244.1.4
    path: "/exports"
  1. Is it possible to set spec.capacity.storage to the entire size of NFS volume.
  2. If possible, do resizing the NFS volume reflect in k8s ?

thanks

-- Shan
kubernetes
nfs
persistent-volumes
storage

1 Answer

5/25/2017

Shan, You can specify the size of the entire share in NFS PV. afacit, there is no quota/size check enforced in NFS plugin. Resizing of PV is under development in Kube 1.7 and currently its undergoing design review. Also, you can use GlusterFS as an another option to specify the exact size of the volume and too get dynamically provisioned.

-- Humble
Source: StackOverflow