Rancher is a container management platform built for organisations deploying production containers. Rancher makes it easy to run Kubernetes everywhere, meet IT requirements, and empower DevOps teams.

Rancher users can create Kubernetes clusters with Rancher Kubernetes Engine (RKE) or cloud Kubernetes services, such as GKE, AKS, and EKS. Rancher users can also import and manage their existing Kubernetes clusters created using any Kubernetes distribution or installer.

Rancher adds significant value on top of Kubernetes, first by centralizing authentication and role-based access control (RBAC) for all clusters, giving global admins the ability to control cluster access from one location.

https://ranchermanager.docs.rancher.com/getting-started/installation-and-upgrade/installation-requirements

I am installing Rancher Manager on a single Docker node.

In the production environment, you can deploy Rancher Manager on Kubernetes Cluster.

Create a CentOS/RHEL/Ubuntu VM in vSphere.

Install Docker

To install Docker, follow the instructions in the official documentation.

https://docs.docker.com/engine/install/ubuntu

The docker installation is complete. Next, deploy the Rancher Manager.

To install Rancher, do the following command.

$ sudo docker run –privileged -d –restart=unless-stopped -p 80:80 -p 443:443 rancher/rancher

Once deployment is complete, execute the following command to verify the container status.

$ docker ps -a

Access the Rancher GUI using the VM IP/FQDN.

The default user name is admin. To retrieve the admin password, use the following command.

docker logs container-id 2>&1 | grep “Bootstrap Password:”

Enter the admin password in the password field. Click on Login as a Local User.

Choose the Set a Specific Password to Use option. Enter a new password and click Continue.

Prerequisites

vSphere User account

Template

DHCP Network with Internet connectivity. (You can use static IPs, although DHCP is preferable.)

Enough resources – CPU, RAM, Storage.

vSphere User Account – You may use the official documentation to create a user and role – https://ranchermanager.docs.rancher.com/how-to-guides/new-user-guides/launch-kubernetes-with-rancher/use-new-nodes-in-an-infra-provider/vsphere/create-credentials

Template – I am using an Ubuntu Template.

Create an Ubuntu VM

Before converting the VM to Template, run the following script.

https://github.com/Dineshk1205/UbuntuTemplate/blob/main/Ubuntu_template.sh

You clone the above git repo or copy and paste a script, then give the file +x permissions and run it.

Shutdown VM and Convert VM to Template.

Click the Create option.

Select the VMware vSphere option.

Enter the vSphere URL, port, username, and password. Continue.

Enter the cluster name (small letter only), pool name (for example, control plane), count, and role (Etcd and Control Plane). Choose vSphere choices based on the environment, DHCP network, and template.

I’m deploying the three control plane nodes and two worker nodes. You may adjust the number of nodes to meet your needs.

Similarly, add the Worker pool and choose the appropriate Configuration settings.

In the Cluster Configuration section, pick the Kubernetes version, cloud provider, CNI Network, and so on. Based on your specifications. Select Create.

Deployment will begin.

Provisioning logs may be monitored.

Cluster VMs created.

When cluster deployment is successful, the cluster state changes to Active.

Select the Explore option.

On the top right side, select the Kubernetes shell option.

Check cluster nodes status

$ kubectl get nodes

The App Section contains a number of official Rancher and partner applications.

You can install applications/tools on the cluster to meet your needs.

I’m installing the Longhorn CSI plugin.

Consider customizing the Helm chart values. You can choose to customize the helm. Click on the Next button.

Click on Install.

The deployment has been finished successfully.

You can use the LONGHORN Dashboard.

You may quickly scale up and down cluster nodes using Rancher Dashboard.