Skip to content

Instantly share code, notes, and snippets.

@richardcase
Last active April 10, 2026 15:22
Show Gist options
  • Select an option

  • Save richardcase/0ca481c9c9d9aabab2b93cd95933485c to your computer and use it in GitHub Desktop.

Select an option

Save richardcase/0ca481c9c9d9aabab2b93cd95933485c to your computer and use it in GitHub Desktop.
Rancher - run locally

Run Rancher Locally with Ngrok

  • 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.

@richardcase

Copy link
Copy Markdown
Author

@mbologna - that's a good point, and thanks for the addition 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment