kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: local-storage
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumer

---
kind: PersistentVolume
apiVersion: v1
metadata:
  name: grafana-pv
  namespace: prometheus
  labels:
    type: local
    app: grafana
spec:
  storageClassName: local-storage
  capacity:
    storage: 10Gi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: "/mnt/pv-grafana"
  dataSource: null
  persistentVolumeReclaimPolicy: Recycle
---
kind: PersistentVolume
apiVersion: v1
metadata:
  name: db-pv
  namespace: default
  labels:
    type: local
    app: db
spec:
  storageClassName: local-storage
  capacity:
    storage: 10Gi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: "/mnt/data"
  dataSource: null
  persistentVolumeReclaimPolicy: Recycle

---
kind: PersistentVolume
apiVersion: v1
metadata:
  name: traefik-certs
  namespace: kube-system
  labels:
    type: local
    app: traefik
spec:
  storageClassName: local-storage
  capacity:
    storage: 2Gi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: "/mnt/traefik-certs"
  dataSource: null
  persistentVolumeReclaimPolicy: Recycle
