Rancher vSphere Node Driver lets you spin up VMs in VMware vSphere directly from your Rancher UI, making it super convenient for managing your Kubernetes clusters across your on-premise infrastructure.

Let’s see it in action. Imagine you’ve got Rancher up and running and you want to add a new cluster that uses vSphere for its nodes.

First, you’d navigate to Cluster Management -> Create Cluster. You’ll see options for different infrastructure providers. Select VMware vSphere.

Now, you need to configure the vSphere connection. This is where you tell Rancher how to talk to your vCenter.

You’ll need to input:

  • vSphere User: The username for a vSphere user with sufficient permissions (e.g., administrator@vsphere.local or a dedicated service account).
  • vSphere Password: The password for that user.
  • vSphere Server: The IP address or hostname of your vCenter server (e.g., vcenter.yourdomain.com).
  • vSphere Datacenter: The name of the vSphere Datacenter where your VMs will reside (e.g., Datacenter).
  • vSphere Folder: The specific folder within the Datacenter to place the VMs (e.g., Kubernetes/MyCluster).
  • vSphere Resource Pool: The resource pool to use for VM provisioning (e.g., Resources/ProductionPool).
  • vSphere Datastore: The datastore to store the VM’s virtual disks (e.g., vsanDatastore).
  • vSphere Network: The network to connect the VMs to (e.g., VM Network).

Once these are entered, Rancher will attempt to connect to vSphere using these credentials. If successful, you’ll see a green checkmark.

Next, you’ll configure your Kubernetes cluster details:

  • Cluster Name: A descriptive name (e.g., prod-cluster-vsphere).
  • Kubernetes Version: The desired version of Kubernetes.
  • Network Provider: Choose your CNI (e.g., Canal, Flannel, Calico).
  • Cloud Provider: This should be set to vsphere.

Then, you define your node pools. For each pool, you specify:

  • Name: (e.g., etcd-pool, worker-pool).
  • Roles: etcd, controlplane, worker. You can select multiple.
  • VM Size: The number of vCPUs and memory for each VM (e.g., 2 vCPUs, 4 GiB RAM).
  • Disk Size: The size of the boot disk for the VMs (e.g., 50 GiB).
  • Number of Nodes: How many VMs to create for this pool.
  • Cloud Provider specific configurations: This is where you map the Rancher node pool to specific vSphere settings, often inheriting from the cluster-level vSphere configuration. You might also specify things like the template VM to use for cloning.

After configuring your node pools, you review the settings and click Create. Rancher then interacts with the vSphere API to provision these VMs, install Docker, and set up Kubernetes on them. You’ll see the cluster status change from Provisioning to Active as the nodes come online and join the cluster.

The most surprising true thing about this driver is that it doesn’t just create blank VMs; it leverages a pre-built Ubuntu or CentOS cloud image that’s already optimized for cloud environments, including SSH access and basic networking configured. Rancher then injects its agent and Kubernetes components into this image.

The next concept you’ll likely explore is managing persistent storage for your Kubernetes applications using vSphere’s capabilities, often through the vSphere Cloud Provider integration for dynamic volume provisioning.

Want structured learning?

Take the full Rancher course →