Skip to main content
Version: 4.5.x

Deploy an Application

This document explains the instructions to deploy an application for the OpenEBS Local Persistent Volumes (PV) backed by Local PV Rawfile storage.

Create the deployment using the PVC backed by Local PV Rawfile storage.

apiVersion: v1
kind: Pod
metadata:
name: app
spec:
containers:
- name: app
image: busybox
command: ["sh", "-c", "while true; do sleep 60; done"]
volumeMounts:
- name: data
mountPath: /data
volumes:
- name: data
persistentVolumeClaim:
claimName: rawfile-pvc

After the deployment of the application, the node will attach the loop device, format it with the configured filesystem, and mount it into the pod. You can verify the volume is in use:

kubectl get pvc rawfile-pvc
kubectl exec app -- df -hT /data

Sample Output

Filesystem Type Size Used Avail Use% Mounted on
/dev/loop3 ext4 10G 24K 9.5G 1% /data

PersistentVolumeClaim Conformance Matrix

The following matrix shows the supported PersistentVolumeClaim parameters for Local PV Rawfile.

ParameterValues
accessModesSupported: ReadWriteOnce / Not Supported: ReadWriteMany, ReadOnlyMany
storageClassNameStorageClass name
resources.requests.storageStorage size with unit (e.g. 10Gi, 100Gi)
volumeModeFilesystem (default), Block
dataSource (VolumeSnapshot)Supported - restores a snapshot into a new PVC
dataSource (PVC clone)Supported - clones an existing same-node PVC

Support

If you encounter issues or have a question, file a Github issue, or talk to us on the #openebs channel on the Kubernetes Slack server.

See Also