What is the maximum storage capacity for kubernetes PersistentVolumes

9/28/2019

Here is an example of .yml file to create an PersistentVolume on a kubernetes cluster:

apiVersion: v1
kind: PersistentVolume
metadata:
  name: task-pv-volume
  namespace: prisma
  labels:
    type: local
spec:
  storageClassName: manual
  capacity:
    storage: xxGi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: "/data"

Can the storage capacity be more than the available storage capacity on the node with the smallest disk in the cluster? Or the maximum is the sum of available disk on the cluster nodes ?

-- farhawa
kubernetes
mounted-volumes
persistent-volumes

2 Answers

9/28/2019

The hostPath mode is intended only for local testing so the requested size does absolutely nothing I'm pretty sure.

-- coderanger
Source: StackOverflow

9/29/2019

generally you are binding the pv to an external storage volume your cloud provider offers (for example - aws EBS), abstracted as a StorageClass, in a size that matches your needs. cluster nodes come and go, you shouldn't rely on their storage.

quick guides: gcp aws azure

-- Efrat Levitan
Source: StackOverflow