Rancher is a free and open-source Kubernetes management software stack that helps developers and users easily manage containers. Rancher comes with an enormous community of users and allows you to build and launch Kubernetes compute nodes directly from the Rancher web interface. Rancher centrally manages your on-premise or hybrid clusters to ensure security and accelerate the transformation and that allows you to deploy and manage your stacks. Developers and businesses looking for tools to quickly deploy Kubernetes nodes will find Rancher useful. For more about Rancher, please check its homepage. To get started with installing and configuring Rancher, please follow the steps below:

Install Docker on Ubuntu

Since Rancher is a Docker-based tool, you must first install Docker. By default, the latest stable version of Docker is not available on the Ubuntu 16.04 default repository. So, you will need to add Docker’s repository to Ubuntu. Run the commands below to install the below tools to add Docker’s repository. Next, add the Docker office repository key by running the commands below: If you wish to verify the above repository, simply run the commands below: The commands above should output similar lines as shown below: Now that the official GPG key is installed, run the commands below to add its stable repository to Ubuntu. To add the nightly or test repository, add the word nightly or test (or both) after the word stable in the commands below. At this point, Docker’s official GPG and repository should be installed on Ubuntu. For those who currently have older versions of Docker, run the commands below to remove them. When you have removed all previous versions of Docker, run the commands below to install the latest and current stable version of Docker. To install a specific version of Docker, run the apt-cache command. Then select the version to install. Now to install a specific version, run the commands below with the version you wish to install If you just want to latest version without specifying the above, run the commands below. The command below will always install the highest possible version. That should install Docker software on Ubuntu. Once the Docker is installed, check the status of Docker with the following command: The above commands should output similar lines as shown below:

Install Rancher

Now that Docker is installed, you can install Rancher simply by running the commands below. Once the Rancher is installed, you can access its portal via the server IP address or hostname followed by port 8080.

Configure Rancher

Now, open your web browser and type the URL http://localhost:8080. When you first access Rancher’s portal, you will not be prompted for a username or password. To enhance its security, you should enable access restriction. Rancher supports many access control including, Active Directory, Azure AD, Github, OpenLDAP, SAML, and Local Authentication. To configure Rancher local authentication, click on the ADMIN menu and click on Access Control. You should see the following page: On the access control page, you will need to provide an admin username and password and click on the Enable Local Auth button. After that, local authentication should be enabled and access restricted to only accounts created on the system. From there you can begin to configure Rancher to suit your environment. Conclusion This post showed you how to install Rancher on Ubuntu 18.04 | 16.04. If you find any errors above, please use the form below to report them. Thanks, You may also like the post below: