PREREQUISITE: Helm

helm repo add rancher-stable https://releases.rancher.com/server-charts/stable

cp /etc/rancher/k3s/k3s.yaml ~/.kube/config

kubectl apply -f https://github.com/cert-manager/cert-manager/releases/latest/download/cert-manager.crds.yaml

helm repo add jetstack https://charts.jetstack.io

helm repo update

helm install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace --set installCRDs=false

kubectl create ns cattle-system

helm install rancher rancher-stable/rancher --namespace cattle-system --set hostname=<hostname> --set bootstrapPassword=<password>