37 lines
795 B
YAML
37 lines
795 B
YAML
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: ceph-rbd-test
|
|
namespace: default
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 1Gi
|
|
storageClassName: ceph-rbd
|
|
---
|
|
apiVersion: v1
|
|
kind: Pod
|
|
metadata:
|
|
name: ceph-rbd-test-pod
|
|
namespace: default
|
|
spec:
|
|
containers:
|
|
- name: test
|
|
image: nginx:alpine
|
|
volumeMounts:
|
|
- name: test-volume
|
|
mountPath: /data
|
|
command: ["/bin/sh", "-c"]
|
|
args:
|
|
- |
|
|
echo "Writing test data..."
|
|
echo "Hello from Ceph RBD!" > /data/test.txt
|
|
cat /data/test.txt
|
|
echo "Keeping pod running for inspection..."
|
|
tail -f /dev/null
|
|
volumes:
|
|
- name: test-volume
|
|
persistentVolumeClaim:
|
|
claimName: ceph-rbd-test
|