How one can Set up Rancher on Ubuntu 22.04 (Step by Step)

On this information, we discover how one can set up and arrange Rancher on Ubuntu 22.04 (Jammy Jellyfish).

What’s Rancher?

Rancher is an opensource container administration software program stack for groups deploying functions on containers. It gives DevOps groups with an assortment of instruments for working and managing containerized workloads whereas addressing safety and operational challenges that include managing a number of Kubernetes clusters.

Rancher helps streamline cluster deployment on varied computing environments together with on-premises (naked metallic), private and non-private clouds and safe them utilizing globally accepted safety insurance policies. With Rancher, you’ll be able to simply launch Kubernetes compute nodes straight from the Rancher WebUI, which it gives out-of-the-box.


Earlier than you embark on this information, here’s what you want.

  • An occasion of Ubuntu 20.04 with SSH entry
  • An everyday consumer configured with sudo privileges
  • 2 CPU Core & 4 GB RAM

With that out of the best way, let’s start:

Step 1) Set up Docker

Rancher is often deployed as a docker container, and consequently, you have to set up Docker. That is an opensource containerization engine that provides OS-Stage virtualization and permits builders to develop, package deal and run functions inside containers.

To put in Docker, first, uninstall or delete older variations of Docker as follows. That is solely you probably have an current Docker set up.

$ sudo apt take away -y docker docker-engine containerd runc

Subsequent, set up Docker as follows.

$ sudo apt set up -y

As soon as put in, do verify that the set up went alongside as anticipated by checking the model of Docker put in.

$ docker model


As well as, add the at the moment logged-in consumer to the Docker group to allow them to run Docker instructions with out sudo privileges.

$ sudo usermod -aG docker $USER

Then activate the modifications to teams.

$ newgrp docker

Step 2) Begin and Allow Docker Service

With Docker put in, the subsequent service is to start out and allow the Docker daemon. To start out Docker, merely run the command:

$ sudo systemctl begin docker

It’s additionally prudent to make sure that the service begins each time throughout system startup.

$ sudo systemctl allow docker

To verify that the Docker service is working, run the command:

$ sudo systemctl standing docker


From the output proven, we will see that Docker is up and working.

Step 3) Set up Rancher

The following step, after putting in Docker, is to put in Rancher.

$ docker run -d --name=rancher-server --restart=unless-stopped -p 80:80 -p 443:443 --privileged rancher/rancher:v2.4.18


The command does a few issues.

It pulls the Rancher picture (v2.4.18) and runs the Rancher container in indifferent mode denoted by the -d flag. It additionally maps the server container port 80 & 443 to port 80 &443 on the host indicated by the parameter -p 80:80 & 443:443.

The –restart=unless-stopped flag will preserve the container working until manually stopped.

To verify that the container is working, execute beneath docker command:

$ docker ps


Notice: While you go along with newest rancher docker picture (v2.6), it can throw beneath error. It seems like Rancher v2.6 is just not examined on Ubuntu 22.04. That’s why we have now used v2.4.18.”: dial tcp join: connection refused

Rancher gives an internet interface and a proxy for accessing and managing Kubernetes clusters.

Step 4) Entry Rancher WebUI

To entry the WebUI, browse the next UI.


It will show the next Welcome web page,


Set admin consumer password, Settle for the phrases & Situations and the clicking on Proceed.

Within the following window, save your rancher server URL,


Primarily based in your curiosity, select whether or not you wish to permit rancher Labs to gather nameless details about the set up,


Click on on ‘Bought it

The Administrator interface involves view as proven


Now log off and log in again once more. This time, you can be offered with a login web page the place you can be requested to authenticate because the admin consumer credentials that you’ve created above.


From right here, you’ll be able to proceed so as to add and import current Kubernetes cluster.

Step 5) Importing Present Kubernetes Cluster

For the demonstration goal, I’ll import the present minikube Kubernetes cluster into rancher WebUI.

Head to the dashboard and click on on ‘Add Cluster’ possibility


Select ‘Import an Present Cluster


Specify the cluster title in following display after which click on on Create


We’ll get the beneath display with instructions to must be run on the Kubernetes cluster.


As we have now used self-signed certificates throughout rancher set up, so copy the curl command and previous it in your Kubernetes cluster,

Head to Kubernetes cluster and run

$ curl --insecure -sfL | kubectl apply -f -


Now, return to Rancher WebUI, there you will notice that the imported cluster is lively now.


Click on on ‘minikube’ cluster to view its dashboard,


Good, that’s all from this information,


On this information, we have now walked you thru the set up of Rancher on Ubuntu 22.04. Your ideas and suggestions are most welcome.

Additionally Learn: How one can Set up VirtualBox in Ubuntu 22.04 LTS (Jammy Jellyfish)

Supply hyperlink

Leave a Reply

Your email address will not be published.