From ef74050af2f11952e301ca38d00c6ee2dc4d55fb Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Tue, 5 Mar 2019 17:46:53 +0530 Subject: [PATCH] add examples for raw block pvc and pod to mount it Signed-off-by: Madhu Rajanna --- examples/rbd/raw-block-pod.yaml | 18 ++++++++++++++++++ examples/rbd/raw-block-pvc.yaml | 13 +++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 examples/rbd/raw-block-pod.yaml create mode 100644 examples/rbd/raw-block-pvc.yaml diff --git a/examples/rbd/raw-block-pod.yaml b/examples/rbd/raw-block-pod.yaml new file mode 100644 index 000000000..c433e98cc --- /dev/null +++ b/examples/rbd/raw-block-pod.yaml @@ -0,0 +1,18 @@ +--- +apiVersion: v1 +kind: Pod +metadata: + name: pod-with-raw-block-volume +spec: + containers: + - name: fc-container + image: fedora:26 + command: ["/bin/sh", "-c"] + args: ["tail -f /dev/null"] + volumeDevices: + - name: data + devicePath: /dev/xvda + volumes: + - name: data + persistentVolumeClaim: + claimName: raw-block-pvc diff --git a/examples/rbd/raw-block-pvc.yaml b/examples/rbd/raw-block-pvc.yaml new file mode 100644 index 000000000..ee37ff33c --- /dev/null +++ b/examples/rbd/raw-block-pvc.yaml @@ -0,0 +1,13 @@ +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: raw-block-pvc +spec: + accessModes: + - ReadWriteOnce + volumeMode: Block + resources: + requests: + storage: 1Gi + storageClassName: csi-rbd