Issues with Rancher deployment and importing K8S clusters

Issues with Rancher deployment and importing K8S clusters

Rancher deployment can have three architectures:

  • Highly available Kubernetes installation: It is recommended to install Rancher on a dedicated Kubernetes cluster using the Kubernetes package manager Helm. In an RKE cluster, three nodes are required to achieve high availability. In a K3s cluster (lightweight kubernetes), only two nodes are required.
  • Single-node Kubernetes installation: Another option is to install Rancher using Helm on a Kubernetes cluster, using only a single node in the cluster. Although the Rancher Server in this case is not highly available, this architecture saves resources while retaining scalability. If you want to save resources in the short term by using a single node while retaining a high availability migration path, the most appropriate architecture is a single-node Kubernetes installation.
  • Single-node Docker installation: Install Rancher with Docker on a single node. The advantage of this installation method is that it works out of the box, and this architecture is recommended for testing and demonstration environments. Its disadvantage is also very obvious. There is no migration between single-node Docker installation and Kubernetes installation. If you have decided to use Rancher in a production environment, we recommend that you choose one of the two Kubernetes installations mentioned above and use it in a production environment.

1. Deploy Rancher v2.27 environment (single-node Docker installation)

1. Here I deploy Rancher to one of the node nodes 172.16.60.234 in the k8s cluster. You need to download the rancher image in advance. Here, select the "rancher/rancher:stable" version image

# Download the rancher service image [root@k8s-node01 ~]# docker pull rancher/rancher:stable

2. Start the Rancher service as a container

# Start the rancher container [root@k8s-node01 ~]# docker run -d -v /tmp/rancher:/tmp/rancher --restart=unless-stopped -p 80:80 -p 443:443 rancher/rancher:stable
 
# View the rancher container [root@k8s-node01 ~]# docker ps | grep rancher
2c2b36cb138b rancher/rancher:stable "entrypoint.sh" 3 hours ago Up 3 hours 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp lucid_robinson

The access address is: https://172.16.60.234. The first time you access, you will be prompted to set the admin password. For example, the administrator password is set to: admin@123456

2. Import k8s cluster to Rancher environment

Import the deployed k8s cluster into the Rancher environment 1. Click "Add Cluster" -> "Import" -> "Add Cluster-Import"

2. Give the imported cluster a name. For example, here I import the k8s cluster name as "kuvin-test-cluster"

This is the end of this article about the problem of deploying and importing K8S clusters in Rancher. For more relevant Rancher K8S cluster content, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • A graphic tutorial on installing Rancher2 and configuring a kubernetes cluster in CentOS
  • Solution to the problem that Rancher cannot add hosts
  • Tutorial on deploying high-performance PHP applications on K8S using Rancher
  • Detailed graphic steps for managing the K8s platform through Rancher interface

<<:  Implementation code for automatically adapting the width of the web page to the width of the mobile phone screen (viewport)

>>:  Detailed explanation of the difference between tinyint and int in MySQL

Recommend

Implementing search box function with search icon based on html css

Preface Let me share with you how to make a searc...

Some questions about hyperlinks

<br />I am very happy to participate in this...

Detailed tutorial on installing MySQL database in Linux environment

1. Install the database 1) yum -y install mysql-s...

Vue SPA first screen optimization solution

Table of contents Preface optimization SSR Import...

In-depth understanding of MySQL self-connection and join association

1. MySQL self-connection MySQL sometimes needs to...

Detailed explanation of Nginx forwarding socket port configuration

Common scenarios for Nginx forwarding socket port...

The iframe refresh method is more convenient

How to refresh iframe 1. To refresh, you can use j...

How to use Docker-compose to build an ELK cluster

All the orchestration files and configuration fil...

Nginx installation error solution

1. Unzip nginx-1.8.1.tar.gz 2. Unzip fastdfs-ngin...

HTML head tag detailed introduction

There are many tags and elements in the HTML head ...