apiVersion: storage.k8s.io/v1beta1
kind: StorageClass
metadata:
name: localstorage
provisioner: docker.io/hostpath
apiVersion: v1
kind: PersistentVolume
metadata:
name: localpv
labels:
type: local
spec:
storageClassName: localstorage
capacity:
storage: 1Gi
accessModes:
- ReadWriteOnce
hostPath:
# this is the path on laptop?
path: "/tmp"
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
app: app
name: localpvc
spec:
storageClassName: localstorage
accessModes:
- ReadWriteOnce
- ReadOnlyMany
resources:
requests:
storage: 2Gi