k8s-学习笔记19-调用公有云存储卷
创建pvc,创建完成后是pending状态,等有dp、pod调用后就会变成bound状态
kind: PersistentVolumeClaim apiVersion: v1 metadata: name: grafana-data namespace: monitoring labels: app: grafana spec: accessModes: - ReadWriteOnce resources: requests: storage: 4Gi storageClassName: gp2 volumeMode: Filesystem
申明volumes,类型就是pvc。这时在公有云的存储卷管理里就能看到这个设备
volumes: - name: grafana-storage persistentVolumeClaim: claimName: grafana-data