2020-09-16 01:02:51 +00:00
|
|
|
apiVersion: v1
|
|
|
|
kind: PersistentVolumeClaim
|
|
|
|
metadata:
|
|
|
|
name: local-path-pvc
|
|
|
|
namespace: kube-system
|
|
|
|
spec:
|
|
|
|
accessModes:
|
|
|
|
- ReadWriteOnce
|
|
|
|
storageClassName: local-path
|
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
storage: 2Gi
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Pod
|
|
|
|
metadata:
|
|
|
|
name: volume-test
|
|
|
|
namespace: kube-system
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: volume-test
|
2021-08-06 23:14:58 +00:00
|
|
|
image: rancher/mirrored-pause:3.1
|
2020-09-16 01:02:51 +00:00
|
|
|
imagePullPolicy: IfNotPresent
|
|
|
|
volumeMounts:
|
|
|
|
- name: volv
|
|
|
|
mountPath: /data
|
|
|
|
volumes:
|
|
|
|
- name: volv
|
|
|
|
persistentVolumeClaim:
|
|
|
|
claimName: local-path-pvc
|