Ceph CSI plugins implement an interface between CSI enabled Container Orchestrator (CO) and Ceph cluster. It allows dynamically provisioning Ceph volumes and attaching them to workloads.
NOTE: This base64 key is generated on one of the Ceph MON nodes using the ceph auth get-key client.admin | base64 command, then copying the output and pasting it as the secret key’s value.
Checked userId and secret key in userSecretName: (On client Node)
1
$ rbd ls -m <ceph-monitor-addrs> -p <your-pool> --id <userId> --key=<ceph secret key of userId>
Create StorageClass(Dynamic Volume Provisioning) using Ceph RBD
Warning ProvisioningFailed 31s (x16 over 19m) persistentvolume-controller Failed to provision volume with StorageClass "ceph-elk": failed to create rbd image: executable file not found in $PATH, command output:
Please check that rbac/deployment.yamlquay.io/external_storage/rbd-provisioner:latest image has the same Ceph version installed as your Ceph cluster. You can check it like this on any machine running docker:
1 2 3 4 5
ceph-cluster:~$ ceph version ceph version 12.2.12 (1436006594665279fe734b4c15d7e08c13ebd777) luminous (stable)
$ docker history quay.io/external_storage/rbd-provisioner:v1.0.0-k8s1.10 | grep CEPH_VERSION <missing> 15 months ago /bin/sh -c #(nop) ENV CEPH_VERSION=luminous 0B
apiVersion:v1 kind:Namespace metadata: name:elk --- apiVersion:v1 kind:Secret metadata: name:ceph-secret-qemu namespace:elk data: key:QVFCNldYTmRtZ29iREJBQSt4dXorNHp0Wi33RWluR1J4U1hWcnc9PQ== --- apiVersion:v1 kind:PersistentVolume metadata: name:ceph-elk-pv0 namespace:elk spec: capacity: storage:64Gi # The 'accessModes' are used as labels to match a PV and a PVC. They currently do not define any form of access control. All block storage is defined to be single user (non- sharedstorage). accessModes: -ReadWriteOnce rbd: monitors: -192.168.0.2:6789 -192.168.0.3:6789 pool:rbd # The 'vmd0' must be created on the Ceph cluster. image:vmd0 user:admin secretRef: name:ceph-secret-qemu fsType:ext4 readOnly:false persistentVolumeReclaimPolicy:Retain --- apiVersion:v1 kind:PersistentVolumeClaim metadata: name:ceph-elk-claim0 namespace:elk spec: # The 'accessModes' do not enforce access rights but instead act as labels to match a PV to a PVC. accessModes: -ReadWriteOnce resources: requests: storage:64Gi --- # pod ...... volumes: - name:data persistentVolumeClaim: claimName:ceph-elk-claim0