no persistent volumes available for this claim and no storage class is set

后端 未结 1 1420
死守一世寂寞
死守一世寂寞 2021-01-17 15:17

my pvc.yaml

kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: database-disk
  labels:
    stage: production
    name: database
    app: mysql
spec         


        
相关标签:
1条回答
  • 2021-01-17 16:04

    Did you create any PV in your cluster?

    PV and Storage classes on local clusters should be done manually by cluster admin.

    Check out Kubernetes documentation for the details:

    1. A cluster administrator creates a PersistentVolume that is backed by physical storage. The administrator does not associate the volume with any Pod.

    2. A cluster user creates a PersistentVolumeClaim, which gets automatically bound to a suitable PersistentVolume.

    3. The user creates a Pod that uses the PersistentVolumeClaim as storage.

    0 讨论(0)
提交回复
热议问题