To size TKG cluster nodes, you specify the virtual machine class. TKG provides default classes, and you can create your own. To use a class, associate it with the target vSphere Namespace and reference the class in the TKG cluster manifest.

About Virtual Machine Classes

A virtual machine class is a request for resource reservations for processing power on the virtual machine (VM), including CPU and memory (RAM). For example, the VM class type named "guaranteed-large" reserves 4 CPU and 16 GB RAM.
Note: The VM disk size is set by the OVA template, not the VM class definition. For Tanzu Kubernetes releases, the disk size is 16 GB.
There are two reservation types for VM classes: guaranteed and best effort. The guaranteed class fully reserves its configured resources. This means that for a given cluster the spec.policies.resources.requests matches the spec.hardware settings. The best effort class allows resources to be overcommitted. For production workloads it is recommended that you use the guaranteed VM class type.
Warning: Because the best effort VM class type allows resources to be overcommitted, you can run out of resources if you have set limits on the vSphere Namespace where you deploy the TKG cluster. If contention occurs and the control plane is impacted, the cluster may stop running. For this reason use the guaranteed VM class type for production clusters. If you cannot use the guaranteed VM class type for all production nodes, at a minimum use guaranteed for the control plane nodes.

Default Virtual Machine Classes

The table lists default virtual machine class types that are used as deployment sizes for Tanzu Kubernetes cluster nodes.

To avoid overcommitting resources, production workloads should use the guaranteed class type. To avoid running out of memory, do not use the small or extra small class size for any worker node where you are deploying workloads in any environment (development, test, or production).

Table 1. Default Virtual Machine Classes
Class CPU Memory (GB) Reserved CPU and Memory
guaranteed-8xlarge 32 128 Yes
best-effort-8xlarge 32 128 No
guaranteed-4xlarge 16 128 Yes
best-effort-4xlarge 16 128 No
guaranteed-2xlarge 8 64 Yes
best-effort-2xlarge 8 64 No
guaranteed-xlarge 4 32 Yes
best-effort-xlarge 4 32 No
guaranteed-large 4 16 Yes
best-effort-large 4 16 No
guaranteed-medium 2 8 Yes
best-effort-medium 2 8 No
guaranteed-small 2 4 Yes
best-effort-small 2 4 No
guaranteed-xsmall 2 2 Yes
best-effort-xsmall 2 2 No

Using VM Classes with TKG Clusters

To use a VM class with a TKG cluster, the VM class must be bound to the vSphere Namespace where the cluster is provisioned. To do this, you associate the class with the target namespace. See Configure a vSphere Namespace for TKG Clusters on Supervisor.

To list the VM classes available in the target vSphere Namespace, use the command kubectl get virtualmachineclassbinding.
Note: The command kubectl describe virtualmachineclasses returns all VM classes present on Supervisor. However, because only bound classes can be used to provision a cluster, this command is informational-only.
VM class definitions are not immutable. Any VM class can be edited, including the default VM class definitions. If a VM class is edited, existing TKG cluster nodes remain unaffected. New TKG clusters use the modified class.
Caution: If you edit a VM class that is in use by a TKG cluster, and then scale out that cluster, the new node(s) will use the edited class definition, but the existing nodes will use the initial class definition, resulting in a mismatch of classes.

vSphere with Tanzu supports custom virtual machine classes for use with TKG clusters. Once you have defined a custom VM class, you must associate it with the target vSphere Namespace before you can use it with a cluster. Refer to the Supervisor Services documentation for details.