Install openebs operator
kubectl apply -f https://openebs.github.io/charts/lvm-operator.yaml
Copy the below contents to a file, sc.yaml and change the volgroup to the name defined in your worker nodes and list the nodes one after the other for lvm nodes
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: openebs-lvmpv
allowVolumeExpansion: true
parameters:
storage: "lvm"
volgroup: "<YOUR VOLUME GROUP NAME>"
provisioner: local.csi.openebs.io
allowedTopologies:
- matchLabelExpressions:
- key: kubernetes.io/hostname
values:
- << Specify the lvm nodes >>
Apply the storage class
kubectl apply -f sc.yaml