Pages

Wednesday, July 12, 2023

Demo Rancher - K8s Platform

Rancher is a complete software stack for teams to manage, deploy, and scale containers in production. It's built on Kubernetes and provides a streamlined interface for deploying, scaling, and managing Kubernetes clusters.

Here are the steps to deploy Rancher on a Linux machine:

Step 1: Provisioning a Linux Host

The requirements for the Linux Host are as follows: Any modern Linux distribution. Ubuntu 18.04 is commonly used for this purpose.
  • A minimum of 4GB RAM.
  • A minimum of 2 CPUs.

Step 2: Install Docker

You can install Docker on your Linux machine by following the official Docker installation documentation for your respective Linux distribution.

For Ubuntu, you can install Docker using the following commands:

sudo apt-get update sudo apt-get install apt-transport-https ca-certificates curl software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" sudo apt-get update sudo apt-get install docker-ce

To verify that Docker is installed correctly, run the following command
sudo docker run hello-world

Step 3: Install Rancher

Run the following Docker command to install Rancher
sudo docker run -d --restart=unless-stopped -p 80:80 -p 443:443 --privileged rancher/rancher:latest
This will pull the latest Rancher server Docker image and start a container.

Step 4: Access Rancher

Rancher operates an HTTPS server on port 443 and HTTP on port 80 of the host machine. You can connect to Rancher using a web browser at the host's IP address or DNS name.

Step 5: Set the Admin Password and URL

The first time you access Rancher, you'll be prompted to set a password for the admin user, and then confirm the server URL.

Step 6: Creating a Kubernetes Cluster

From the Global view, navigate to Clusters and click on "Add Cluster". You will have a list of options to choose from for where to deploy your Kubernetes cluster. It could be on existing nodes, an infrastructure provider, or hosted Kubernetes providers.

After the selection, just follow the respective on-screen instructions to proceed with the cluster creation.

Step 7: Deploying Workloads

Once your cluster is active, you can start deploying workloads. This can be done from the 'Default' project within your cluster.

These steps should allow you to deploy Rancher on a Linux machine and manage other Kubernetes clusters. Note that Rancher's flexibility allows for many other configurations, which may vary based on your specific requirements.


No comments:

Post a Comment