Continental Innovates with Rancher and Kubernetes
In this section, you’ll learn how to use Rancher to install an RKE Kubernetes cluster in vSphere.
First, you will set up your vSphere cloud credentials in Rancher. Then you will use your cloud credentials to create a node template, which Rancher will use to provision nodes in vSphere.
Then you will create a vSphere cluster in Rancher, and when configuring the new cluster, you will define node pools for it. Each node pool will have a Kubernetes role of etcd, controlplane, or worker. Rancher will install RKE Kubernetes on the new nodes, and it will set up each node with the Kubernetes role defined by the node pool.
For details on configuring the vSphere node template, refer to the vSphere node template configuration reference.
For details on configuring RKE Kubernetes clusters in Rancher, refer to the cluster configuration reference.
This section describes the requirements for setting up vSphere so that Rancher can provision VMs and clusters.
The node templates are documented and tested with the vSphere Web Services API version 6.5.
Before proceeding to create a cluster, you must ensure that you have a vSphere user with sufficient permissions. When you set up a node template, the template will need to use these vSphere credentials.
Refer to this how-to guide for instructions on how to create a user in vSphere with the required permissions. These steps result in a username and password that you will need to provide to Rancher, which allows Rancher to provision resources in vSphere.
It must be ensured that the hosts running the Rancher server are able to establish the following network connections:
See Node Networking Requirements for a detailed list of port requirements applicable for creating nodes on an infrastructure provider.
The free ESXi license does not support API access. The vSphere servers must have a valid or evaluation ESXi license.
If you have a cluster with DRS enabled, setting up VM-VM Affinity Rules is recommended. These rules allow VMs assigned the etcd and control-plane roles to operate on separate ESXi hosts when they are assigned to different node pools. This practice ensures that the failure of a single physical machine does not affect the availability of those planes.
The a vSphere cluster is created in Rancher depends on the Rancher version.
Result: You have created the cloud credentials that will be used to provision nodes in your cluster. You can reuse these credentials for other node templates, or in other clusters.
Creating a node template for vSphere will allow Rancher to provision new nodes in vSphere. Node templates can be reused for other clusters.
Use Rancher to create a Kubernetes cluster in vSphere.
Your cluster is created and assigned a state of Provisioning. Rancher is standing up your cluster.
You can access your cluster after its state is updated to Active.
Active clusters are assigned two Projects:
After creating your cluster, you can access it through the Rancher UI. As a best practice, we recommend setting up these alternate ways of accessing your cluster: