How to setup Rancher Web UI to manage your Kubernetes Cluster

silver and black laptop computer
Reading Time: 3 minutes

Hello folks, In this blog, we’ll learn about Rancher which is a cloud orchestration and cluster management tool. and it’s completely open-source . so future we’ll see how you can use Rancher to manage your Kubernetes cluster.

What Rancher does?

It acts as the management interface so you don’t have to know about the kubectl if you’re a beginner but I’ll recommend you to get familiar with kubectl the low-level fundamentals.

it would be easy to have a web interface where you can deploy the application manage cluster and everything without having to run from the command line.

You can manage the multiple clusters, not the single cluster so if you’ve already got a k8s cluster running on-premise or in the cloud somewhere so you can manage them using Rancher.

Rancher supports GCE( Google Compute Engine), the cluster in the google cloud and amazon EKS, Microsoft, etc.

You can provision the cluster in these three cloud providers or you can use your own existing Kubernetes cluster.

kubectl get nodes
kubectl cluster-info

Now we’ve got a clean cluster running :

sudo apt update

you should have docker installed to verify:

docker --version

and it’s running:

sudo systemctl start docker
sudo systemctl enable docker
sudo systemctl status docker

install the Rancher:

sudo docker run -d --restart=unless-stopped -p 8080:8080 rancher/server:stable

The command above instructs Docker to run the container in detached mode and to keep it running (unless it is manually stopped). The server container is configured to listen to port 8080, but you can modify the port number according to your needs.

To access the Rancher user interface, open a web browser and type the server IP number and port in the URL bar following the syntax:

https://[server_ip]:[port]
https://127.0.0.1:8080

in my case 8089 because in my machine 8080 is already in use by Jenkins so.

docker ps

to access the web UI copy the above URL and you’ll see the like below:

Configure Rancher:

 Now, Open the ADMIN drop-down menu and click Access Control.

Click the LOCAL button in the menu to move to the Local Authentication window.

You will need to provide the required information to set up an Admin user and click Enable Local Auth to confirm.

After it goes to the infrastructure menu and select Hosts.

you can set up the hosts by following steps defined by Rancher itself. and then Create a Custom Kubernetes Cluster.

Conclusion:

After reading this article, you should have learned how to install Rancher on Ubuntu and set up the platform to start creating Kubernetes clusters. for more check it.

Scala Future

Written by 

A curious DevOps Intern , love to learn and working on technical skills/tools, know the basics of Linux, Docker, Ansible , Kubernetes and more..