How To Setup and Configure Rancher

Posted By :Kapil Soni |29th December 2022

Introduction

Describe Rancher. One of the top providers of open-source cloud-native Kubernetes management is Rancher. It enables consistent workload scaling and management over thousands of clusters in any environment. Any certified Kubernetes distribution is supported by Rancher. It keeps track of the condition of each configured cluster. Additionally, it makes managing the K8s cluster as easy as clicking a button. Visit their official website here to learn more.

 

Some Benefits of Rancher

After your Kubernetes cluster is established, Rancher simply makes all the tasks simple and manageable. Scaling, examining, and keeping track of the cluster's health, configuring warnings and logging, activating security, and many more tasks. It really bases its own app library, which it has, on Helm. By integrating with top-tier open-source tools and programs, it releases Kubernetes' full potential.

Learn how to set up Rancher with your Kubernetes cluster in this article.Having a Kubernetes cluster is necessary.

Install Rancher using Docker in step 1.

On your host server, execute the command. Rancher-data is a directory that I've already built to mount the persistent Volume container. It is always a wise move.

docker run --privileged -d --restart=unless-stopped -p 80:80 -p 443:443 -v /home/ubuntu/rancher-data:/var/lib/rancher rancher/rancher

Step 2: Open a browser and navigate to the server's port 80. The phrase 'Connection is not Private' will first appear. Simply disregard that and click the Advanced button to continue.

Then you will see a place to enter the default user's password (admin).
and enter the server IP address in the URL for the Rancher server.

Step 3. In Rancher, add the cluster

Our cluster may now be added in Rancher. Simply click the 'Add Cluster' button to access this page.
All of the Kubernetes cluster providers are listed here. In this instance, we'll configure our cluster on the host server that this Rancher is now operating on using the 'Import an existing cluster' option.

Step 4: Download the YAML configuration file and set up the K8s cluster in Rancher.

The final order is to be executed. Most of the time, this work's.

Note: Because the command will differ depending on the setting, simply copy it from this page.

The configuration file will be downloaded by this command (YAML).

Apply the downloaded file to your cluster in step 5.

$ kubectl apply -f <config-file.yaml>

And Rancher is set up for your Kubernetes cluster.

Both the node panel and the dashboard will provide information about your cluster and nodes, respectively.
Step 6: Launch a deployment or pod

To deploy a pod or deployment, follow these steps:

Over the cluster's name, choose a namespace, and then On the deploy button, click.
This concludes the quick installation of Rancher for a Kubernetes cluster.

Advice: Use these steps to go to any deployment's shell terminal in Rancher:

Click the desired deployment, then select the right-hand three dots. Then select Execute Shell.


About Author

Kapil Soni

Kapil is an exceptionally skilled DevOps Engineer with a profound understanding and expertise in a wide range of cutting-edge technologies. His knowledge encompasses AWS, Azure, GCP, Kubernetes, Azure DevOps CI/CD, ELK, and more. He has a proven track record of successfully deploying and managing large-scale cloud infrastructures. He leverages automation tools and follows industry best practices to ensure optimal performance and scalability. Kapil's collaborative approach and unwavering commitment to continuous improvement make him an invaluable team member in dynamic environments. He has made significant contributions to numerous projects, including Kubernetes and AWS, Oneinfinity, Dunkan, SecureNow, Yogamu, and several others.

Request For Proposal

[contact-form-7 404 "Not Found"]

Ready to innovate ? Let's get in touch

Chat With Us