默认的storage class有HostPath,HostPath 卷 (仅供单节点测试使用;不适用于多节点集群; 请尝试使用 local 卷作为替代)
1 2 3 4
kubectl get sc -A NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE standard (default) k8s.io/minikube-hostpath Delete Immediate false 40d
kubectl get sc -A NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE local-storage kubernetes.io/no-provisioner Retain WaitForFirstConsumer false 2m41s standard (default) k8s.io/minikube-hostpath Delete Immediate false 41d
kubectl get pv -A NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE data-kafka-0 5Gi RWO Retain Available local-storage 6s
kubectl get pv,pvc --all-namespaces NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE persistentvolume/data-kafka-0 5Gi RWO Retain Available local-storage 12m persistentvolume/data-zookeeper-0 5Gi RWO Retain Available local-storage 2m5s