2018-03-13 00:57:27 +00:00
|
|
|
apiVersion: v1
|
|
|
|
kind: PersistentVolumeClaim
|
|
|
|
metadata:
|
|
|
|
name: longhorn-volv-pvc
|
2020-12-06 18:27:46 +00:00
|
|
|
namespace: default
|
2018-03-13 00:57:27 +00:00
|
|
|
spec:
|
|
|
|
accessModes:
|
|
|
|
- ReadWriteOnce
|
|
|
|
storageClassName: longhorn
|
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
storage: 2Gi
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Pod
|
|
|
|
metadata:
|
|
|
|
name: volume-test
|
|
|
|
namespace: default
|
|
|
|
spec:
|
2019-11-13 07:20:19 +00:00
|
|
|
restartPolicy: Always
|
2018-03-13 00:57:27 +00:00
|
|
|
containers:
|
|
|
|
- name: volume-test
|
2018-03-22 22:53:42 +00:00
|
|
|
image: nginx:stable-alpine
|
2018-03-13 00:57:27 +00:00
|
|
|
imagePullPolicy: IfNotPresent
|
2019-11-13 07:20:19 +00:00
|
|
|
livenessProbe:
|
|
|
|
exec:
|
|
|
|
command:
|
|
|
|
- ls
|
|
|
|
- /data/lost+found
|
|
|
|
initialDelaySeconds: 5
|
|
|
|
periodSeconds: 5
|
2018-03-13 00:57:27 +00:00
|
|
|
volumeMounts:
|
|
|
|
- name: volv
|
|
|
|
mountPath: /data
|
|
|
|
ports:
|
|
|
|
- containerPort: 80
|
|
|
|
volumes:
|
|
|
|
- name: volv
|
|
|
|
persistentVolumeClaim:
|
|
|
|
claimName: longhorn-volv-pvc
|