[ https://issues.apache.org/jira/browse/HDFS-13022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16332463#comment-16332463 ]
Elek, Marton commented on HDFS-13022: ------------------------------------- I cleaned up the first version: * Unit test for the transformation logic * Proper configuration key handling (everything is in the ozone-defaults.xml) * Correct handling for the pvc size (Gi, Ti) Now it's stable, but can't be used without HDFS-13018 and HDFS-13017. To test: 1. First of all you need a kubernetes cluster and a deployed cblock service. I used my helm charts from [https://github.com/flokkr/charts:] {code:java} helm upgrade --install demo ./cblock --set image.tag=iscsi --set serviceAccount=cblock{code} 2. You need the cluster ip of the iscsi server. Edit the configmap and set the dfs.cblock.iscsi.advertised.ip key to the value of the iscsi service (kubectl get svc) 3. You need a storage definition (kubectl apply -f storage.yaml) {code:java} apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: cblock annotations: storageclass.kubernetes.io/is-default-class: "true" provisioner: hadoop.apache.org/cblock{code} 4. And you can try to create a new persistent container: {code:java} kind: PersistentVolumeClaim apiVersion: v1 metadata: name: persistent spec: accessModes: - ReadWriteOnce resources: requests: storage: 1Gi --- apiVersion: apps/v1 kind: Deployment metadata: name: persistent labels: app: persistent spec: replicas: 1 selector: matchLabels: app: persistent template: metadata: labels: app: persistent spec: containers: - name: persistent image: alpine command: ["cat"] tty: true stding: true volumeMounts: - mountPath: "/data" name: iscsi volumes: - name: iscsi persistentVolumeClaim: claimName: persistent{code} As a result you can see a good PersistentVolume/PersistentVolumeClaim and after a few minutes (first formatting could be slow) the running pod with the attached volume. > Block Storage: Kubernetes dynamic persistent volume provisioner > --------------------------------------------------------------- > > Key: HDFS-13022 > URL: https://issues.apache.org/jira/browse/HDFS-13022 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: HDFS-7240 > Affects Versions: HDFS-7240 > Reporter: Elek, Marton > Assignee: Elek, Marton > Priority: Major > Attachments: HDFS-13022-HDFS-7240.001.patch, > HDFS-13022-HDFS-7240.002.patch > > > {color:#FF0000}{color} > With HDFS-13017 and HDFS-13018 the cblock/jscsi server could be used in a > kubernetes cluster as the backend for iscsi persistent volumes. > Unfortunatelly we need to create all the required cblocks manually with 'hdfs > cblok -c user volume...' for all the Persistent Volumes. > > But it could be handled with a simple optional component. An additional > service could listen on the kubernetes event stream. In case of new > PersistentVolumeClaim (where the storageClassName is cblock) the cblock > server could create cblock in advance AND create the persistent volume could > be created. > > The code is very simple, and this additional component could be optional in > the cblock server. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org