Skip to content

Instantly share code, notes, and snippets.

Last active March 28, 2023 15:13
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Installing Rancher and RKE
Installing RKE and Rancher
Ubuntu 20.04
1 vim /etc/ssh/sshd_config
2 systemctl restart sshd
3 sudo apt-get update
4 sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
5 curl -fsSL | sudo apt-key add -
6 sudo add-apt-repository "deb [arch=amd64] \
$(lsb_release -cs) \
7 sudo apt-get update
8 sudo apt-get install docker-ce docker-ce-cli
9 systemctl status docker
10 usermod -aG docker root
11 sysctl net.bridge.bridge-nf-call-iptables=1
12. Copy the public ssh key where rke client is installed to the rancher server
kiranchavala@Kirans-MacBook-Pro .ssh % scp root@
root@master2:~# cat ~/ >> ~/.ssh/authorized_keys
For centos host make sure it's a non root user
Install Rke client
brew install rke
rke config ---> this will generate cluster.yaml
rke up
cp kube_config_cluster.yml .kube/config
kubectl get nodes
Installing Rancher
1.Install helm on your client
brew install helm
helm repo add rancher-latest
kubectl create namespace cattle-system
2. Install the cert manager
kubectl apply --validate=false -f
kubectl create namespace cert-manager
helm repo add jetstack
helm repo update
helm install \
cert-manager jetstack/cert-manager \
--namespace cert-manager \
--version v0.15.0
kubectl get pods --namespace cert-manager
make sure all cer-pods are running
3. Rancher
helm install rancher rancher-latest/rancher \
--namespace cattle-system \
Replace with the hostname of ubuntu server(master from hostname command)
kubectl -n cattle-system get deploy rancher
You can set the password and url you want to access rancher from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment