Does Persistent Volume reserves local disk space?

11/8/2019

In Minikube, created many Persistent Volumes and its claims as a practice? Do they reserve disk space on local machine?

Checked disk usage

apiVersion: v1
kind: PersistentVolume
metadata:
  name: pv
spec:
  capacity:
    storage: 100Gi
   accessModes:
     - ReadWriteMany
   storageClassName: shared
   hostPath:
     path: /data/config

---

$ kubectl create -f 7e1_pv.yaml
$ kubectl get pv

Now create YAML for Persistent Volume Claim

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: pvc
spec:
  storageClassName: shared
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage:90Gi
$ kubectl create -f 7e2_pvc.yaml
-- engineerbaz
kubernetes
persistent-volume-claims

1 Answer

11/9/2019

No, it's just a local folder. The size value is ignored.

-- coderanger
Source: StackOverflow