For AI agents: the complete documentation index is available at https://docs.ovhcloud.com/it/llms.txt, the full documentation bundle is available at https://docs.ovhcloud.com/it/llms-full.txt, and this page is available as Markdown at https://docs.ovhcloud.com/it/guides/public-cloud/containers-orchestration/managed-rancher-service/create-kubernetes-custom-nodes.md.

Creating a Kubernetes cluster with existing nodes (Generic) in MRS

Vedi come Markdown

Find out how to create a RKE2/K3s Kubernetes cluster with existing nodes on a Managed Rancher Service

Objective

Managed Rancher Service by OVHcloud provides a powerful platform for orchestrating Kubernetes clusters seamlessly. You can use Rancher to deploy a Kubernetes cluster on any platform and location including:

  • Hosted Kubernetes provider (e.g. OVHcloud Managed Kubernetes Service, AWS EKS, GCP GKE, etc).
  • Infrastructure Provider - Public Cloud or Private Cloud (vSphere, Nutanix, etc).
  • Bare-metal servers, cloud hosted or on premise.
  • Virtual machines, cloud hosted or on premise
Rancher Cluster Creation

In this guide we will explore how to create a RKE2 or K3s Kubernetes cluster using existing nodes through the Custom driver.

Requirements

Instructions

You should have existing machines (virtual or physical) accessible through SSH.

Follow this guide if you want to create OVHcloud Compute Instances.

Creating a Kubernetes cluster with existing nodes

Log in to your Managed Rancher Service UI.

OVHcloud Managed Rancher Service UI

Click the Create button.

OVHcloud Managed Rancher Service Create Kubernetes PCI

Click on the Custom driver.

Fill in a cluster name (custom-kube-cluster for example).

In the Kubernetes version list, choose the latest version of the wanted OS. You can choose between K3s and RKE2. For production needs we recommend RKE2.

Choose the container network (calico by default).

Rancher Custom Cluster Creation

Click on the different tabs to configure your cluster depending on your needs.

Click the Create button.

Configuring a Kubernetes cluster with existing nodes

Info

When you configure a node in Rancher, there are three roles that can be assigned to nodes: etcd, Control Plane and Worker.

There are some good practices:

  • At least 3 nodes with the role etcd are needed to survive a loss of 1 node and have a minimum high availability configuration for etcd. 3 etcd nodes are generally sufficient for smaller and medium clusters, and 5 etcd nodes for large clusters.
  • At least 2 nodes with the role Control Plane for master component high availability.
  • You can set both the etcd and Control Plane roles for one instance.
  • The Worker role should not be used or added to nodes with the etcd or controlplane role.
  • At least 2 nodes with the role Worker for workload rescheduling upon node failure.

For the configuration of our etcd + Control Plane nodes, check only the etcd and Control Plane Nodes Roles:

Rancher cluster roles Rancher command roles for etcd and control plane

SSH to your machines/nodes you created for etcd and Control Plane and copy/paste the registration command.

ssh xxxxx@xxx.xxx.xxx.xxx

curl -fL https://xxxxxx.xxxx.rancher.ovh.net/system-agent-install.sh | sudo  sh -s - --server https://xxxxxx.xxxx.rancher.ovh.net --label 'cattle.io/os=linux' --token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --etcd --controlplane

For the configuration of our Worker nodes, uncheck the checkboxes and check only the Worker checkbox:

Rancher cluster roles Rancher command for workers

SSH to your machines/nodes you created for etcd and controlpane and copy/paste the registration command.

ssh xxxxx@xxx.xxx.xxx.xxx

curl -fL https://xxxxxx.xxxx.rancher.ovh.net/system-agent-install.sh | sudo  sh -s - --server https://xxxxxx.xxxx.rancher.ovh.net --label 'cattle.io/os=linux' --token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --worker

After executing these commands to the machines/nodes, wait until the cluster is in Active state in the Rancher UI.

Go further

  • To have an overview of OVHcloud Managed Rancher Service, you can go to the OVHcloud Managed Rancher Service page.

  • For training or technical assistance implementing our solutions, contact your sales representative or visit our Professional Services page to request a quote and have your project analysed by our experts.

  • Our team remains available on our dedicated Discord Channel, do not hesitate to join and reach us : https://discord.gg/ovhcloud. Ask questions, provide feedback and interact directly with the team that builds our Container and Orchestration services.

  • Join our community of users.

Questa pagina ti è stata utile?