Kubernetes PV/PVC

PV

PVC

1
2
3
4
5
6
7
8
9
10
11
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pv-claim
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
storageClassName: pd-standard

使用PVC

1
2
3
4
5
6
7
volumes:
- name: nameservice-logs-ps
persistentVolumeClaim:
claimName: nameservice-logs-pv-claim
- name: nameservice-store-ps
persistentVolumeClaim:
claimName: nameservice-store-pv-claim