k8s之PersistentVolume&PersistentVolumeClaim
kind:PersistentVolume apiVersion: v1 metadata: name: mysql-pv spec: capacity: storage:1Gi hostPath: path:/home/work/share/mysql type:'' accessModes: -ReadWriteOnce claimRef: kind:PersistentVolumeClaim namespace:default name: mysql-pvc persistentVolumeReclaimPolicy:Retain volumeMode:Filesystem kind: PersistentVolumeClaim apiVersion: v1 metadata: name: mysql-pvc namespace: default labels: app: mysql-pvc spec: accessM...
k8s deployment with persistentVolume
kind: Deployment apiVersion: apps/v1 metadata: name: mut-deployment namespace: default labels: app: mut spec: replicas: 1 selector: matchLabels: app: mut template: metadata: labels: app: mut spec: volumes: - name: testcase-storage persistentVolumeClaim: claimName: mut-pvc containers: - name: mut image: 'mut:20210531' ports: - containerPort: 80...