Thanks Techno Tim for describing this in details. Saved my life multiple times.
install helm
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
add helm
repo, stable
helm repo add rancher-stable https://releases.rancher.com/server-charts/stable
create rancher namespace
kubectl create namespace cattle-system
install cert-manager
kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v1.2.0/cert-manager.crds.yaml
create name-space for cert-manager
kubectl create namespace cert-manager
Add the Jetstack Helm repository
helm repo add jetstack https://charts.jetstack.io
update helm repo
helm repo update
install cert-manager
helm chart
*Note: If you receive an “Error: Kubernetes cluster unreachable” message when installing cert-manager, try copying
the contents of “/etc/rancher/k3s/k3s.yaml” to “~/.kube/config” to resolve the issue.*
helm install cert-manager jetstack/cert-manager --namespace cert-manager --version v1.2.0
check rollout of cert-manager
kubectl get pods --namespace cert-manager
Be sure each pod is fully running before proceeding
Install Rancher with Helm
Note:If you have “.local” for your private TLD then Rancher will NOT finish the setup within the webUI
helm install rancher rancher-stable/rancher --namespace cattle-system --set hostname=rancher.example.com
check rollout
kubectl -n cattle-system rollout status deploy/rancher
you should see
1 2 3 4 Waiting for deployment "rancher" rollout to finish: 0 of 3 updated replicas are available... Waiting for deployment "rancher" rollout to finish: 1 of 3 updated replicas are available... Waiting for deployment "rancher" rollout to finish: 2 of 3 updated replicas are available... deployment "rancher" successfully rolled out
check status
kubectl -n cattle-system rollout status deploy/rancher
you should see
deployment "rancher" successfully rolled out
load balancer
If you are using k3s
you can use the traefik
ingress controller that ships with k3s
run
kubectl get svc --all-namespaces -o wide
look for
kube-system traefik LoadBalancer 10.43.202.72 192.168.100.10 80:32003/TCP,443:32532/TCP 5d23h app=traefik,release=traefik
then create a DNS entry for rancher.example.com 192.168.100.10
This can be a host entry on your machine, or a DNS entry in your local DNS system (router, pi hole, etc…)