41 lines
728 B
YAML
41 lines
728 B
YAML
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: garbo
|
|
namespace: default
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
storageClassName: longhorn
|
|
resources:
|
|
requests:
|
|
storage: 2Gi
|
|
---
|
|
apiVersion: v1
|
|
kind: Pod
|
|
metadata:
|
|
name: volume-test
|
|
namespace: default
|
|
spec:
|
|
restartPolicy: Always
|
|
containers:
|
|
- name: volume-test
|
|
image: nginx:stable-alpine
|
|
imagePullPolicy: IfNotPresent
|
|
livenessProbe:
|
|
exec:
|
|
command:
|
|
- ls
|
|
- /data/lost+found
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 5
|
|
volumeMounts:
|
|
- name: volv
|
|
mountPath: /data
|
|
ports:
|
|
- containerPort: 80
|
|
volumes:
|
|
- name: volv
|
|
persistentVolumeClaim:
|
|
claimName: garbo
|