- Install k3s and k3d locally
k3d cluster create rancher-test- Install cert manager
kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.5.1/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 --version v1.5.1- Create namespace for Rancher
kubectl create namespace cattle-system- Install Rancher via Helm
helm repo add rancher-stable https://releases.rancher.com/server-charts/stable
helm repo update
helm install rancher rancher-stable/rancher --namespace cattle-system --set bootstrapPassword=admin --set replicas=1 --set hostname=rancher.my.org --version 2.7.2- Open 2 terminal windows:
- Start forwarding to the Rancher service
kubectl port-forward --namespace cattle-system svc/rancher 10000:443- Start ngrok pointing to the port forward address
ngrok http https://localhost:10000- Then access Rancher via the ngrok url :)
the port-forward will stop occasionally so you will need to restart it if that happens.
On some installations, you can get the following error:
You can bypass it by appending
--set global.cattle.psp.enabled=falseto thehelm installcommand