- Related task: #2755 Steps to manually install Harvester csi-driver on K3s cluster
Reference Document
Deploying with Harvester K3s Node Driver
Verify steps
-
Prepare a Harvester cluster with enough cpu, memory and disks for K3s guest cluster
-
Create a Rancher instance
-
Import Harvester in Rancher and create cloud credential
-
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 k3s cluster
-
Provide the login credential in user data
password: 123456 chpasswd: { expire: False } ssh_pwauth: True
-
On K3s, by default will not provide cloud-provider
-
Check k3s 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 k3s default
-
ssh to the k3s 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 k3s 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.
-
Open Storage -> StorageClasses
-
PersistentVolumeClaims page
-
Create a PVC named
test-pvc
, selectHarvester
in the Storage Class
Expected Results
-
Check can successfully install csi-driver on
Installed Apps
-
Check
Harvester
set to thedefault
storage class -
Check the
test-pvc
exists onPersistentVolumeClaims
page -
Check a new pv created on PersistentVolumes
-
Check the created pv also exists on Harvester Volumes page