Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to migrate from Rancher 1.6 to 2.0

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article will explain in detail how to migrate from Rancher 1.6to 2.0. the content of the article is of high quality, so the editor will share it with you for reference. I hope you will have some understanding of the relevant knowledge after reading this article.

There is a big difference between Rancher 2.0 and Rancher 1.6 because of the orchestration technology used to complete the transition to Kubernetes,Rancher 2.0. Currently, there is no direct upgrade path between the two versions.

So what should users who want to migrate from Rancher 1.6 to Rancher 2.0 do?

Installation

Note that Rancher 2.0 currently supports only the following Docker versions:

1.12.6

1.13.1

17.03.2

These Docker versions are found under external dependencies in the upstream version of Kubernetes, and all of the versions listed above are verified.

Rancher currently uses Kubernetes version 1.10 and plans to use version 1.11 in version 2.0.7. Rancher continuously updates the latest upstream version of Kubernetes.

For single-node development and installation, you can use a similar docker run command to configure a Linux host with Docker and install Rancher in the Docker container, just like installing Rancher 1.6.

For the development environment, we recommend that you install Rancher by running a single Docker container.

One difference from Rancher 1.6 is that Rancher 2.0 requires you to use SSL to improve security, so you need to provide a certificate during installation. If you do not provide a certificate, Rancher will automatically generate a self-signed certificate for you. For options on certificates, see here:

Https://rancher.com/docs/rancher/v2.x/en/installation/single-node-install/#2-choose-an-ssl-option-and-install-rancher

The setup for installing high availability Rancher2.0 is very different from 1.6. For specific steps, please refer to:

Https://rancher.com/blog/2018/2018-08-09-migrate-1dot6-setup-to-2dot0/

Please note that any existing automation scripts for 1.6Rancher Server in HA mode will need to be reset in the installation of Rancher 2.0.

Configure authentication

If you have previously set up authentication in Rancher 1.6, you must be familiar with the authentication methods supported by Rancher in the following figure.

In Rancher 2.0, all of the above authentication methods are still supported, and we have added support for several new authentication providers, as shown in the following figure:

The basic configuration of authentication requires that the settings are the same as those on Rancher1.6. You can check the documentation for the details of configuring different authentication.

(https://rancher.com/docs/rancher/v2.x/en/admin-settings/authentication/)

One difference is worth noting that in Rancher 2.0 settings, local auth is always turned on even if you configure any other authentication mechanism.

Add clusters and projects

After you run the Rancher installation and enable authentication, the next thing to do is to create a cluster and a project where the workload can be deployed. In the setup of Rancher 1.6, you should create an environment where compute nodes can be added after installation. In Rancher 2.0, you need to create a cluster and add compute nodes to the cluster.

If you don't know anything about clusters or how to create clusters, please refer to the official website:

Https://rancher.com/docs/rancher/v2.x/en/cluster-provisioning/#what-s-a-kubernetes-cluster

The view after the cluster is set up is as follows, and there is a [default] project available in each cluster.

The "environment" of Cattle in 1.6 is equivalent to "cluster with projects" in 2.0 for the following reasons:

In 1.6, computing resources are allocated to the environment.

In 2.0, you assign them to clusters.

In 1.6, users are added to the environment, where they can deploy services and share access to hosts that belong to the environment.

In 2.0, users are added to the project, and the workloads they deploy can access the resources in the project.

This cluster and project model allows multi-tenancy because the hosts are owned by the cluster and the cluster can be further divided into multiple projects where users can manage their applications.

Create a namespace

After adding clusters and projects, the next step is to define the namespaces used to group application workloads. In Rancher 1.6, creating a stack can combine services that belong to your application. In 2.0, you need to create namespaces for the same purpose. The default namespace is provided in the project, and if the workload is not explicitly provided, the namespace will deploy the workload. Similar to 1.6, Rancher 2.0 supports service discovery within and across namespaces.

Migration application

When your Kubernetes cluster and project are in place, the next step is to migrate the workload.

If you are a Rancher 1.6user and use a Cattle environment, you need to understand the changes in scheduling, load balancing, service discovery, service monitoring, and so on, in Rancher 2.0 during the migration of your workload. You can follow the upcoming series of articles (https://rancher.com/blog/2018/2018-08-02-journey-from-cattle-to-k8s/) on how to migrate using Rancher 2.0 UI or converting a Docker Compose configuration to Kubernetes YAML. It is designed to explore areas related to workload deployment and the equivalent options available in Rancher 2.0.

If you are already running your workload in a Rancher 1.6 Kubernetes environment, you can import the Kubernetes YAML file directly into the Rancher 2.0 cluster using UI or Rancher CLI.

On how to migrate from Rancher 1.6to 2.0to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report