Developer Mode
Developer mode is intended to be used for development and testing purposes. Usage of this mode in production environments is not supported. |
Prerequisites
-
The node has passed the host-check
-
Helm 3 and Git are installed on your local machine.
Installation of the First Node
You can install Harvester on an RKE2 cluster using the Helm CLI. For more information about installing and configuring the Harvester Helm chart, see the readme.
-
Create an RKE2 configuration file.
sudo mkdir -p /etc/rancher/rke2 cat <<EOF | sudo tee /etc/rancher/rke2/config.yaml disable: ** rke2-snapshot-controller ** rke2-snapshot-controller-crd ** rke2-snapshot-validation-webhook node-label: ** harvesterhci.io/managed=true token: token cni: ** multus ** canal EOF
-
Install RKE2.
curl -sfL https://get.rke2.io | sudo sh - sudo systemctl enable rke2-server.service --now
-
Create a kubeconfig file.
mkdir -p ~/.kube sudo cp /etc/rancher/rke2/rke2.yaml ~/.kube/config sudo chown $(id -u):$(id -g) ~/.kube/config
importantAllow some time for all pods in the
kube-system
namespace to reach theReady
state before proceeding to the next step.If you are unable to locate the kubectl binary in
/usr/local/bin
, check/var/lib/rancher/rke2/bin
. -
Install system-upgrade-controller. This Kubernetes-native upgrade controller for nodes installs
upgrade.cattle.io/v1
CRDs.kubectl apply -f https://github.com/rancher/system-upgrade-controller/releases/download/v0.13.1/system-upgrade-controller.yaml
-
Create the cattle-system namespace.
kubectl create ns cattle-system
-
Add the Rancher chart repository.
helm repo add rancher-latest https://releases.rancher.com/server-charts/latest
-
Install the Rancher v2.7.5 chart.
helm install rancher rancher-latest/rancher \ --namespace cattle-system \ --set tls=external \ --set rancherImagePullPolicy=IfNotPresent \ --set rancherImage=rancher/rancher \ --set rancherImageTag=v2.7.5 \ --set noDefaultAdmin=false \ --set features="multi-cluster-management=false\,multi-cluster-management-agent=false" \ --set useBundledSystemChart=true \ --set bootstrapPassword=admin
Allow some time for all pods in the
cattle-system
namespace to reach theReady
state before proceeding to the next step. -
Clone the
rancher/charts
repository.git clone https://github.com/rancher/charts -b dev-v2.7
-
Install the rancher-monitoring-crd chart.
helm install rancher-monitoring-crd ./charts/charts/rancher-monitoring-crd/102.0.2+up40.1.2/
-
Create the harvester-system namespace.
kubectl create ns harvester-system
-
Clone the
harvester/harvester
repository.git clone https://github.com/harvester/harvester.git
-
Install the harvester-crd chart.
helm install harvester-crd ./harvester/deploy/charts/harvester-crd --namespace harvester-system
-
Install the Harvester chart using kube-vip running on a static IP.
VIP_ADDRESS="replace with an IP which is allocated to any device, such as 192.168.5.131" helm install harvester ./harvester/deploy/charts/harvester --namespace harvester-system \ --set harvester-node-disk-manager.enabled=true \ --set "harvester-node-disk-manager.labelFilter={COS_*,HARV_*}" \ --set harvester-network-controller.enabled=true \ --set harvester-network-controller.vipEnabled=true \ --set harvester-load-balancer.enabled=true \ --set kube-vip.enabled=true \ --set kube-vip-cloud-provider.enabled=true \ --set longhorn.enabled=true \ --set longhorn.defaultSettings.defaultDataPath=/var/lib/harvester/defaultdisk \ --set longhorn.defaultSettings.taintToleration=kubevirt.io/drain:NoSchedule \ --set rancherEmbedded=true \ --set service.vip.enabled=true \ --set service.vip.mode=static \ --set service.vip.ip=${VIP_ADDRESS}
-
Access the Harvester UI at https://${VIP_ADDRESS}. The default password is
admin
.
Installation of Other Nodes
-
Create an RKE2 configuration file.
sudo mkdir -p /etc/rancher/rke2 cat <<EOF | sudo tee /etc/rancher/rke2/config.yaml server: https://<vip address>:9345 token: token EOF
-
Install the RKE2 agent.
curl -sfL https://get.rke2.io | INSTALL_RKE2_TYPE="agent" sudo sh - sudo systemctl enable rke2-agent.service --now