PersistentVoumeClaim 未绑定到 PersistentVolume

PersistentVoumeClaim not binding to PersistentVolume

我有一个裸机 kubernetes 集群。我想了解为什么声明不绑定卷,但我不明白。

这是音量:

apiVersion: v1
kind: PersistentVolume
metadata:
  name: main-pv
spec:
  capacity:
    storage: 1Gi
  volumeMode: Filesystem
  accessModes:
    - ReadWriteOnce
  persistentVolumeReclaimPolicy: Delete
  local:
    path: /data/mongodb
  nodeAffinity:
    required:
      nodeSelectorTerms:
        - matchExpressions:
            - key: kubernetes.io/hostname
              operator: In
              values:
                - ip-172-31-68-214

这是我在 describe pvc 中看到的:

Name:          xxxx-services-1-mongodb
Namespace:     default
StorageClass:
Status:        Pending
Volume:
Labels:        app.kubernetes.io/component=mongodb
               app.kubernetes.io/instance=xxxx-services-1
               app.kubernetes.io/managed-by=Helm
               app.kubernetes.io/name=mongodb
               helm.sh/chart=mongodb-9.1.1
Annotations:   meta.helm.sh/release-name: xxxx-services-1
               meta.helm.sh/release-namespace: default
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:
Access Modes:
VolumeMode:    Filesystem
Mounted By:    xxxx-services-1-mongodb-5547c455ff-mhznt
Events:
  Type    Reason         Age                From                         Message
  ----    ------         ----               ----                         -------
  Normal  FailedBinding  3s (x62 over 15m)  persistentvolume-controller  no persistent volumes available for this claim and no storage class is set

我发现了问题:需要 8Gi 容量。我以为它会在 describe pvc 中描述,但没有,只有在 yaml...