From a0b26796b3091f10fdf1adc74283b7c20917ab2c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Jun 2021 20:33:00 +0200 Subject: [PATCH] ++cephfs --- rook.md | 18 ++++++++++++++++++ rook/storageclass-cephfs.yaml | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 rook/storageclass-cephfs.yaml diff --git a/rook.md b/rook.md index c123a09..bc5a7c3 100644 --- a/rook.md +++ b/rook.md @@ -33,3 +33,21 @@ kubectl -n rook-ceph exec -it deploy/rook-ceph-tools -- bash ``` kubectl apply -f pvc.yaml ``` + +Checks: + +``` +kubectl get pvc +kubectl describe pvc + +kubectl get pv +kubectl describe pv +``` + +Digging into ceph, seeing the actual image: + +``` +[20:05] server47.place7:~# kubectl -n rook-ceph exec -it deploy/rook-ceph-tools -- rbd -p replicapool ls +csi-vol-d3c96f79-c7ba-11eb-8e52-1ed2f2d63451 +[20:11] server47.place7:~# +``` diff --git a/rook/storageclass-cephfs.yaml b/rook/storageclass-cephfs.yaml new file mode 100644 index 0000000..fc8169b --- /dev/null +++ b/rook/storageclass-cephfs.yaml @@ -0,0 +1,34 @@ +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: rook-cephfs +provisioner: rook-ceph.cephfs.csi.ceph.com # driver:namespace:operator +parameters: + # clusterID is the namespace where operator is deployed. + clusterID: rook-ceph # namespace:cluster + + # CephFS filesystem name into which the volume shall be created + fsName: myfs + + # Ceph pool into which the volume shall be created + # Required for provisionVolume: "true" + pool: myfs-data0 + + # The secrets contain Ceph admin credentials. These are generated automatically by the operator + # in the same namespace as the cluster. + csi.storage.k8s.io/provisioner-secret-name: rook-csi-cephfs-provisioner + csi.storage.k8s.io/provisioner-secret-namespace: rook-ceph # namespace:cluster + csi.storage.k8s.io/controller-expand-secret-name: rook-csi-cephfs-provisioner + csi.storage.k8s.io/controller-expand-secret-namespace: rook-ceph # namespace:cluster + csi.storage.k8s.io/node-stage-secret-name: rook-csi-cephfs-node + csi.storage.k8s.io/node-stage-secret-namespace: rook-ceph # namespace:cluster + + # (optional) The driver can use either ceph-fuse (fuse) or ceph kernel client (kernel) + # If omitted, default volume mounter will be used - this is determined by probing for ceph-fuse + # or by setting the default mounter explicitly via --volumemounter command-line argument. + # mounter: kernel +reclaimPolicy: Delete +allowVolumeExpansion: true +mountOptions: + # uncomment the following line for debugging + #- debug