Skip to main content

vSphere Cloud Provider

This section describes how to enable the vSphere cloud provider. You will need to use the cloud_provider directive in the cluster YAML file. For more details on configuring the file structure refer to the configuration reference.

The vSphere Cloud Provider interacts with VMware infrastructure (vCenter or standalone ESXi server) to provision and manage storage for persistent volumes in a Kubernetes cluster.

Prerequisites

  • Credentials: You'll need to have credentials of a vCenter/ESXi user account with privileges allowing the cloud provider to interact with the vSphere infrastructure to provision storage. Refer to this document to create and assign a role with the required permissions in vCenter.
  • VMware Tools must be running in the Guest OS for all nodes in the cluster.
  • Disk UUIDs: All nodes must be configured with disk UUIDs. This is required so that attached VMDKs present a consistent UUID to the VM, allowing the disk to be mounted properly. See the section on enabling disk UUIDs.

Enabling the vSphere Provider with the RKE CLI

To enable the vSphere Cloud Provider in the cluster, you must add the top-level cloud_provider directive to the cluster configuration file, set the name property to vsphere and add the vsphereCloudProvider directive containing the configuration matching your infrastructure. See the configuration reference for more details.

Enabling the vSphere Provider in Rancher

When provisioning Kubernetes using RKE clusters in Rancher, the vSphere Cloud Provider can be enabled by configuring the cloud_provider directive nested under the rancher_kubernetes_engine_config directive in the cluster config YAML file. For more information on the configuration file structure please see the Rancher RKE Cluster Configuration Reference.