Source – https://rancher.com/docs/rancher/v2.5/en/installation/install-rancher-on-k8s/
In order to install Rancher in your cluster, Your cluster needs to have the following:
- Storage Configured (e.g. using NFS Storage Provisioner)
- Ingress Controller (e.g. using Nginx or Traefik)
- Cert-Manager (see Setup Cert Manager)
- Setup Helm
- Install Rancher
Just download the binary for your OS and add it to your system Path variable https://github.com/helm/helm/releases
The full instruction for installing Helm is available here https://v3.helm.sh/docs/intro/install/
Add the Racncher Helm Chart Repository
# Add Chart
helm repo add rancher-latest https://releases.rancher.com/server-charts/latest
Create the rancher namespace
kubectl create namespace rancher
You can install rancher in one of two ways
- Using LetsEncrypt to generate SSL Certificates
- Using your own SSL Certificate
# Install Rancher using LetsEncrypt
helm install rancher rancher-latest/rancher --namespace rancher --set hostname=rancher.hostname.com --set ingress.tls.source=letsEncrypt --set letsEncrypt.email=me@example.org
# Install Rancher using Your Own Certs
# Make sure the tls Cert is configured in rancher namespace
kubectl create secret tls tls-rancher-ingress --cert=tls-dev-io.crt --key=tls-dev-io.key --namespace rancher
# Install using the Certs
helm install rancher rancher-latest/rancher --namespace rancher --set hostname=rancher.hostname.com --set ingress.tls.source=tls-rancher-ingress
Can change clusterip to nodeport command line without editor? | |
$ kubectl patch svc kubernetes-dashboard --type='json' -p '[{"op":"replace","path":"/spec/type","value":"NodePort"}]' | |
$ kubectl patch svc you-svc -p '{"spec": {"type": "NodePort"}}' | |
$ kubectl -n kube-system get service kubernetes-dashboard -o yaml > kube-dash-svc.yaml | |
$ sed 's/ClusterIP/NodePort/' kube-dash-svc.yaml > new-kube-dash-svc.yaml | |
$ kubectl delete svc kubernetes-dashboard | |
$ kubectl create -f new-kube-dash-svc.yaml |
I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I am working at Cotocus. I blog tech insights at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at I reviewed , and SEO strategies at Wizbrand.
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at PINTEREST
Rajesh Kumar at QUORA
Rajesh Kumar at WIZBRAND