apiVersion:storage.k8s.io/v1 kind:StorageClass metadata: name:rook-cephfs # Change "rook-ceph" provisioner prefix to match the operator namespace if needed provisioner:rook-ceph.cephfs.csi.ceph.com parameters: # clusterID is the namespace where the rook cluster is running # If you change this namespace, also change the namespace below where the secret namespaces are defined clusterID:rook-ceph
# 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-replicated
# 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 csi.storage.k8s.io/controller-expand-secret-name:rook-csi-cephfs-provisioner csi.storage.k8s.io/controller-expand-secret-namespace:rook-ceph csi.storage.k8s.io/node-stage-secret-name:rook-csi-cephfs-node csi.storage.k8s.io/node-stage-secret-namespace:rook-ceph
reclaimPolicy:Delete
应用:
1 2 3 4 5 6 7
[vagrant@master01 examples]$ kubectl apply -f storageclass-myfs.yaml storageclass.storage.k8s.io/rook-cephfs created [vagrant@master01 examples]$ kubectl get sc NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE rook-ceph-block rook-ceph.rbd.csi.ceph.com Delete Immediate true 6h56m rook-ceph-block-ec rook-ceph.rbd.csi.ceph.com Delete Immediate true 6h42m rook-cephfs rook-ceph.cephfs.csi.ceph.com Delete Immediate false 3s
评论· · · · · ·