51 lines
1,023 B
YAML
51 lines
1,023 B
YAML
|
apiVersion: v1
|
||
|
kind: PersistentVolumeClaim
|
||
|
metadata:
|
||
|
name: block-pvc
|
||
|
spec:
|
||
|
accessModes:
|
||
|
- ReadWriteMany
|
||
|
volumeMode: Block
|
||
|
resources:
|
||
|
requests:
|
||
|
storage: 1Gi
|
||
|
storageClassName: rook-ceph-block-ssd
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: Pod
|
||
|
metadata:
|
||
|
name: my-pod
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: my-container
|
||
|
image: alpine:3.14
|
||
|
command: ["/bin/sh", "-c"]
|
||
|
args: [ "tail -f /dev/null" ]
|
||
|
volumeDevices:
|
||
|
- devicePath: /dev/rbdblock
|
||
|
name: my-volume
|
||
|
imagePullPolicy: IfNotPresent
|
||
|
volumes:
|
||
|
- name: my-volume
|
||
|
persistentVolumeClaim:
|
||
|
claimName: block-pvc
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: Pod
|
||
|
metadata:
|
||
|
name: my-pod2
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: my-container
|
||
|
image: alpine:3.14
|
||
|
command: ["/bin/sh", "-c"]
|
||
|
args: [ "tail -f /dev/null" ]
|
||
|
volumeDevices:
|
||
|
- devicePath: /dev/rbdblock
|
||
|
name: my-volume
|
||
|
imagePullPolicy: IfNotPresent
|
||
|
volumes:
|
||
|
- name: my-volume
|
||
|
persistentVolumeClaim:
|
||
|
claimName: block-pvc
|