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 ?
The hostPath
mode is intended only for local testing so the requested size does absolutely nothing I'm pretty sure.
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.