https://rancher.com/ logo
#harvester
Title
# harvester
s

stale-painting-80203

01/05/2023, 5:02 PM
In an RKE2 cluster running on Harvester I would like to allow the cluster to create volumes on the longhorn storage created by harvester. I was told that I can use the CSI driver as per https://docs.harvesterhci.io/v1.1/rancher/csi-driver/#deploying-with-harvester-k3s-node-driver. Unfortunately I am unable to get this to work because I created the cluster using Rancher's "Use existing nodes and create a cluster using RKE2/K3s" . Apparently if you already have an existing cluster you can use the method described for "Harvester K3s Node Driver". I am able to deploy the driver, but when the cluster tries to create the volume it fails even though I can see the correct storage driver
Copy code
kubectl describe sc
Name:                  harvester
IsDefaultClass:        Yes
Annotations:           <http://meta.helm.sh/release-name=harvester-csi-driver,meta.helm.sh/release-namespace=kube-system,storageclass.kubernetes.io/is-default-class=true|meta.helm.sh/release-name=harvester-csi-driver,meta.helm.sh/release-namespace=kube-system,storageclass.kubernetes.io/is-default-class=true>
Provisioner:           <http://driver.harvesterhci.io|driver.harvesterhci.io>
Parameters:            <none>
AllowVolumeExpansion:  True
MountOptions:          <none>
ReclaimPolicy:         Delete
VolumeBindingMode:     Immediate
Events:                <none>
s

square-orange-60123

01/05/2023, 6:06 PM
yes, for rke2/k3s you need to deploy the cpi/csi charts as part of creating the cluster. You do this via the
cloud provider
option when creating the cluster. However as you found out, this is not supported after a cluster has already been created. There may be a workaround or something I’m missing that others could chime in with, but I would suggest either: • using the harvester node driver through rancher (this automatically installs the cloud provider for harvester for you) • creating a new
use existing nodes
cluster, where harvester cloud provider is selected, and registering nodes there (though there may be some additional step I’m not aware of to get this to work)
s

stale-painting-80203

01/05/2023, 10:39 PM
I don't know how to create nodes using Harvester as cloud provider for SLES-15 OS (that's why I pre-created the cluster). For Ubuntu I have a cloud image and was able to create harvester cluster and nodes on the fly. I was advised by Harvester team that it was possible to install the driver post-cluster creation, but since I reported further issues I have not got a response back from them: https://github.com/harvester/harvester/issues/3308
48 Views