Local PV

Local Persistent Volumes#

# 添加 StorageClass
# 然后需要部署 provisioner 创建 PVs
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: local-storage
provisioner: kubernetes.io/no-provisioner
# WaitForFirstConsumer 跟随 Pod 调度
# https://kubernetes.io/docs/concepts/storage/storage-classes/#volume-binding-mode
volumeBindingMode: WaitForFirstConsumer