pv-mysql.yaml 655 B

123456789101112131415161718192021222324
  1. kind: PersistentVolume
  2. apiVersion: v1
  3. metadata:
  4. name: git-mysql
  5. spec:
  6. storageClassName: local
  7. capacity:
  8. storage: 10Gi
  9. accessModes:
  10. - ReadWriteOnce
  11. persistentVolumeReclaimPolicy: Retain
  12. # PV for mon must be a filesystem volume.
  13. volumeMode: Filesystem
  14. local:
  15. # If you want to use dm devices like logical volume, please replace `/dev/sdb` with their device names like `/dev/vg-name/lv-name`.
  16. path: /data/IMPORTANT-git-mysql
  17. nodeAffinity:
  18. required:
  19. nodeSelectorTerms:
  20. - matchExpressions:
  21. - key: kubernetes.io/hostname
  22. operator: In
  23. values:
  24. - k8smaster