longhorn/examples/csi/example_pv.yaml
Sheng Yang f1a19e3c61 Sync with manager
commit 36b37fcb5955ef5b45ca53cb0dea630806d24541
Author: Sheng Yang <sheng.yang@rancher.com>
Date:   Wed Sep 18 18:03:02 2019 -0700

    Longhorn v0.6.0-rc2 release

Signed-off-by: Sheng Yang <sheng.yang@rancher.com>
2019-09-18 18:27:01 -07:00

51 lines
954 B
YAML

apiVersion: v1
kind: PersistentVolume
metadata:
name: longhorn-vol-pv
spec:
capacity:
storage: 2Gi
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Delete
csi:
driver: io.rancher.longhorn
fsType: ext4
volumeAttributes:
numberOfReplicas: '3'
staleReplicaTimeout: '2880'
volumeHandle: existing-longhorn-volume
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: longhorn-vol-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Gi
volumeName: longhorn-vol-pv
---
apiVersion: v1
kind: Pod
metadata:
name: volume-test
namespace: default
spec:
containers:
- name: volume-test
image: nginx:stable-alpine
imagePullPolicy: IfNotPresent
volumeMounts:
- name: vol
mountPath: /data
ports:
- containerPort: 80
volumes:
- name: vol
persistentVolumeClaim:
claimName: longhorn-vol-pvc