Create a Managed Cluster on vSphere from the DKP UI
You can use the DKP user interface to provision a vSphere cluster quickly and easily.
Prerequisites
Ensure that you have fulfilled the vSphere vCenter configuration prerequisites described in vSphere: VMware Prerequisites before you begin these procedures.
You must also create a vSphere infrastructure provider before you can create additional vSphere clusters.
Provision a vSphere Cluster
Provisioning a production-ready cluster in vSphere requires you to specify a fairly large number of parameters. Breaking up the sections of the form, as done below, makes it a little easier to complete.
Complete these procedures to provision a vSphere cluster:
Provide Basic Cluster Information
In the section of the provisioning form, you give the cluster a name and provide some basic information:
In the selected workspace Dashboard, select the Add Cluster button at the top right to display the Add Cluster page.
Select the Create Cluster card.
Provide these cluster details in the form:
Cluster Name: A valid Kubernetes name for the cluster.
Add Labels: Add any required Labels the cluster needs for your environment by selecting the
+ Add Label
link.
By default, your cluster has labels that reflect the infrastructure provider provisioning. For example, your vSphere cluster may have a label for the data center andprovider: vsphere
. Cluster labels are matched to the selectors created for Projects. Changing a cluster label may add or remove the cluster from projects.Infrastructure Provider: This field's value corresponds to the vSphere infrastructure provider you created while fulfilling the prerequisites.
Kubernetes Version: Select a supported version of Kubernetes for this version of DKP.
SSH Public Key: Paste into this field the public key value for a user who is authorized to create vSphere clusters.
Workspace: The workspace where this cluster belongs (if within the Global workspace).
Specify the Cluster Resources and Network Information
This section of the form identifies already existing resources in your VMware vCenter configuration. Refer to your vCenter configuration to find the necessary values.
Provide the following values for the Resources that are specific to vSphere:
Datacenter: Select an existing data center name.
The data-center is the top level organizational unit in vSphere.Datastore: Enter a valid vSphere datastore name.
Datastores in vSphere are storage resources that provide storage infrastructure for virtual machines within a data center. They are a subset of data center resources, with each datastore being associated with a specific data center.Folder: Enter a valid, existing folder name, or leave it blank to use the vSphere root folder.
When provisioning a Kubernetes cluster on vSphere using Cluster API andclusterctl
, vSphere uses the folder parameter to specify the vSphere folder where it creates and manages the virtual machines for the Kubernetes cluster. Specifying the folder helps maintain an organized inventory of your virtual machines and other resources in your vSphere environment.
Enter the values for the network information in the lower half of this section:
Network: Enter an existing network name you want the new cluster to use.
You need to create required network resources, such as port groups or distributed port groups, in the vSphere Client or using the vSphere API before you use DKP to create a new cluster.Resource Pool: Enter the name of a logical resource pool for the cluster’s resources.
In vSphere, resource pools are a logical abstraction that allow you to allocate and manage computing resources, such as CPU and memory, for a group of virtual machines. Use resource pools only when needed, as they can add complexity to your environment.Virtual Machine Template: Enter the name of the virtual machine template to use for the managed cluster's virtual machines.
In vSphere, a virtual machine (VM) template is a pre-configured virtual machine that you can use to create new virtual machines with identical configurations quickly. The template contains the basic configuration settings for the VM, such as the operating system, installed software, and hardware configurations.Storage Policy: Enter the name of a valid vSphere storage policy. This field is optional.
A storage policy in vSphere specifies the storage requirements for virtual machine disks and files. It consists of a rule-set that defines the storage capabilities required, tags to identify it, profiles that collect settings and requirements, and storage requirements that include storage performance, capacity, redundancy, and other attributes necessary for the virtual machine to function properly. By creating and applying a storage policy to a specific datastore or group of datastores, you can ensure that virtual machines using that datastore meet the specified storage requirements.
Configure Node Pool Information
You need to configure node pool information for both your control plane nodes and your worker nodes. The form splits these information sets into two groups.
Provide the control plane node pool name and resource sizing information:
Node Pool Name: DKP sets this field’s value,
control-plane
, and you cannot change it.Disk: Enter the amount of disk space allocated for each control plane node. The default value is 80 GB. The specified custom disk size must be equal to, or larger than the size of the base OS image root file system. This is because a root file system cannot be reduced automatically when a machine first boots.
Memory: The amount of memory for each control plane node, in GB. The default value is 16 GB.
Number of CPUs: Enter the number of virtual processors in each control plane node. The default value is 4 CPUs per control plane node.
Replicas: Enter the number of control plane nodes to create for your new cluster.
Valid values for production clusters are 3 or 5. You can enter 1 if you are creating a test cluster, but a single control plane is not a valid production configuration. You must enter an odd number to allow for internal leader selection processes to provide proper failover for high availability. The default value is 3 control plane nodes.
Provide the worker node pool name and resource sizing information:
Node Pool Name: Enter a node pool name for the worker nodes. DKP sets this field’s default value to
worker-0
.Disk: Enter the amount of disk space allotted for each worker node. The default value is 80GB. The specified custom disk size must be equal to, or larger than the size of the base OS image root file system. This is because a root file system cannot be reduced automatically when a machine first boots.
Memory: The amount of memory for each worker node, in GB. The default value is 32 GB.
Number of CPUs: Enter the number of virtual processors in each worker node. The default value is 8 CPUs per node.
Replicas: Enter the number of worker nodes to create for your new cluster. The default value is 4 worker nodes.
Set Virtual IP Parameters
In this section of the form, you configure the built-in virtual IP.
Provide the Virtual IP information needed for managing this cluster with DKP:
Interface: Enter the name of the network used for the virtual IP control plane endpoint.
This value is specific to your environment and cannot be inferred by DKP. An example value iseth0
orens5
.Host: Enter the control plane endpoint address.
To use an external load balancer, set this value to the load balancer’s IP address or hostname. To use the built-in virtual IP, set to a static IPv4 address in the Layer 2 network of the control plane machines.Port: Enter the control plane’s endpoint port.
The default port value is 6443. To use an external load balancer, se this value to the load’s balancer’s listening port.
Supply MetalLB Information
The MetalLB load balancer is needed for cluster installation, and requires these values:
Provide a Starting IP address range value for the load balancing allocation.
Provide an Ending IP address range value for the load balancing allocation.
Configure the StorageClass Options
In this section of the form, you configure the storage options for your vSphere cluster. The StorageClass defines the provisioning properties and requirements for the storage used to store the persistent data of the Kubernetes application.
You can provide either the Datastore URL or the Storage Policy Name in this section.
Select the Datastore URL button if it is not already highlighted, and then in the Datastore URL field, enter a unique identifier in URL format used by vSphere to access specific storage locations. A typical example of the field’s format is
ds:///vmfs/volumes/<datastore_uuid>/
.Select the Storage Policy Name button if it is not already highlighted, and then in the Storage Policy Name field, enter the name of the storage policy to use with the cluster’s StorageClass.
Advanced Configuration Parameters
You can open the Advanced configuration parameters sections by selecting the Show Advanced link.
Configure CIDR Values for the Pod Network and Kubernetes Services
In this section of the form, you configure Classless Inter-Domain Routing (CIDR) Values that your vSphere cluster uses.
Enter a CIDR value for the Pod network in the Pod Network CIDR field. The default value is 192.168.0.0/16.
Enter a CIDR value for Kubernetes Services in the Service CIDR field. The default value is 10.96.0.0/12.
Configure the Docker Registry Mirror
In this section, you configure a registry mirror for container images. The first time you request an image from your local registry mirror, it pulls the image from a public registry and stores it locally before handing it back to you. On subsequent requests, the local registry mirror serves the image from its own storage.
Configure the image registry mirror:
Registry Mirror URL: Enter the URL of a container registry to use as a registry mirror.
Registry Mirror Username: Enter the name of a user who can authenticate to the registry mirror.
Registry Mirror Password: Enter the password for the username in the previous entry.
Registry Mirror CA Cert: Upload a certificate file, or copy the CA certificate chain value into the provided field to use while communicating with the registry mirror using Transport Layer Security (TLS).
This value is a trusted root certificate (or chain of certificates) that validates the SSL/TLS connection between clients and the registry mirror, ensuring secure and trustworthy communications.
Create the Managed Cluster on vSphere
Select the Create button (at the page’s top right corner) to begin provisioning the cluster.
This step may take a few minutes, taking time for the cluster to be ready and fully deploy its components. The cluster automatically tries to join the management cluster for federation and fleet operations, and should resolve after it is fully provisioned.
While DKP provisions the new cluster, you can access the Clusters page to view the new cluster. A new cluster card with the name of your cluster appears, and shows a “Pending” cluster status while the cluster comes up and joins the management cluster.
Next Actions
Select the View Details link (on the cluster card’s bottom left corner) to see additional information about this cluster.