- Related task: #2755 Steps to manually install Harvester csi-driver on RKE2 cluster
Reference Document
Deploying with Harvester RKE2 Node Driver
Verify steps
-
ssh to Harvester management node
-
Extract the kubeconfig of Harvester with
cat /etc/rancher/rke2/rke2.yaml
-
Change the server value from https://127.0.0.1:6443/ to your VIP
-
Copy the kubeconfig and add into your local ~/.kube/config file
-
Import Harvester in Rancher
-
Create cloud credential
-
Provision a RKE2 cluster
-
Provide the login credential in user data
password: 123456 chpasswd: { expire: False } ssh_pwauth: True
-
Select cloud-provider to
Default - RKE2 Embedded
(on Rancher 2.6 you need to select to NONE) -
Check RKE2 cluster provisioning in Ready
-
Use the new generate_cloud_provider_config.sh to generate
cloud-config
content for csi-driver./generate_cloud_provider_config.sh <serviceaccount name> <namespace> e.g ./generate_cloud_provider_config.sh rke2 default
-
ssh to the RKE2 guest cluster vm
-
Create the config-files directory
mkdir -p /var/lib/rancher/rke2/etc/config-files
-
Add the cloud-provider-config file from the cloud-config part of output generated from script
vim /var/lib/rancher/rke2/etc/config-files/cloud-provider-config
-
Access RKE2 guest cluster on Rancher
-
Switch to
All Namespace
-
Open Apps -> Charts
-
Install Harvester CSI Driver from the Rancher marketplace. You do not need to change the cloud-config path.
-
Check can successfully install csi-driver on
Installed Apps
-
Check
Harvester
set to thedefault
storage class -
Create a nginx deployment in Workload -> Deployments
-
Create a Persistent Volume Claims, select storage class to
harvester
-
Select the
Single-Node Read/Write
-
Create a standalone PVC on
PersistentVolumeClaims
page withharvester
storage class
Expected Results
-
Check can deploy nginx service correctly
-
Check can correctly create PVC in
PersistenVolumeClaims
-
Check can correctly create PV in
PersistentVolumes
-
Open Harvester Volumes page, check the corresponding volume exists
-
Check can correctly create PVC and PV
-
Check can create corresponding volume on Harvester