🚀 DevOps & SRE Certification Program 📅 Starting: 1st of Every Month 🤝 +91 8409492687 🔍 Contact@DevOpsSchool.com

Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

Rancher Installation & Deployment in Kubernetes Clustor

Source – https://rancher.com/docs/rancher/v2.5/en/installation/install-rancher-on-k8s/

Rancher Installation

Prerequisites

In order to install Rancher in your cluster, Your cluster needs to have the following:

  1. Storage Configured (e.g. using NFS Storage Provisioner)
  2. Ingress Controller (e.g. using Nginx or Traefik)
  3. Cert-Manager (see Setup Cert Manager)

Steps:

  1. Setup Helm
  2. Install Rancher

1. Setup Helm

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/

2. Install Rancher

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

  1. Using LetsEncrypt to generate SSL Certificates
  2. Using your own SSL Certificate

1. Using LetsEncrypt

# 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

2. Using your own Certificates

# 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
Subscribe
Notify of
guest


0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.

0
Would love your thoughts, please comment.x
()
x