The Tanzu Kubernetes Grid Service API exposes several parameters for provisioning and updating Tanzu Kubernetes clusters.

Parameters for Provisioning Tanzu Kubernetes Clusters

This table lists and describes all YAML parameters and acceptable values for cluster provisioning.

Note: This table is a reference for all cluster provisioning parameters. To view the hierarchy of the parameters in example YAML files, see Example YAML Files for Provisioning Tanzu Kubernetes Clusters.
Table 1. Parameters for Provisioning Tanzu Kubernetes Clusters
Name Value Description
apiVersion run.tanzu.vmware.com/v1alpha1 Specifies the version of the Tanzu Kubernetes Grid Service API.
kind TanzuKubernetesCluster Specifies the type of Kubernetes resource to create. The only allowed value is TanzuKubernetesCluster (case-sensitive).
metadata Not applicable Includes cluster metadata, such as name and namespace. This is standard Kubernetes metadata, so you can use generateName instead of name, add labels and annotations, and so on.
name A user-defined string that accepts alphanumeric characters and dashes, for example: my-tkg-cluster-1 Specifies the name of the cluster to create. Current cluster naming constraints:
  • Name length must be 41 characters or less.
  • Name must begin with a letter.
  • Name may contain letters, numbers, and hyphens.
  • Name must end with a letter or a number.
namespace A user-defined string that accepts alphanumeric characters and dashes, for example: my-sns-1 Identifies the name of the Supervisor Namespace where the cluster will be deployed. This is a reference to a Supervisor Namespace that exists on the Supervisor Cluster.
spec Not applicable Includes the specification, expressed in declarative fashion, for the end-state of the cluster, including the node toplogy and Kubernetes software distribution.
topology Not applicable Includes fields that describe the number, purpose, and organization of cluster nodes and the resources allocated to each. Cluster nodes are grouped into pools based on their intended purpose: either control-plane or worker. Each pool is homogeneous, having the same resource allocation and using the same storage.
controlPlane Not applicable Specifies the topology of the cluster control plane, including the number of nodes (count), type of VM (class), and the storage resources allocated for each node (storageClass).
count An integer that is either 1 or 3 Specifies the number of control plane nodes. The control plane must have an odd number of nodes.
class A system-defined element in the form of a string from an enumerated set, for example: guaranteed-small or best-effort-large Specifies the name of the VirtualMachineClass that describes the virtual hardware settings to be used each node in the pool. This controls the hardware available to the node (CPU and memory) as well as the requests and limits on those resources. See Virtual Machine Class Types for Tanzu Kubernetes Clusters.
storageClass node-storage (for example) Identifies the storage class to be used for storage of the disks which store the root file systems of the control plane nodes. Run kubectl describe ns on the namespace to view the available storage classes. The available storage classes for the namespace depend on the storage set by the vSphere administrator. Storage classes associated with the Supervisor Namespace are replicated in the cluster. In other words, the storage class must be available on the Supervisor Namespace to be a valid value for this field.
workers Not applicable Specifies the topology of the cluster worker nodes, including the number of nodes (count), type of VM (class), and the storage resources allocated for each node (storageClass).
count An integer between 0 and 150, for example: 1 or 2 or 7 Specifies the number of worker nodes in the cluster. A cluster with zero worker nodes can be created, allowing for a cluster with only control plane nodes. There is no hard maximum for the number of worker nodes, but a reasonable limit is 150.
class A system-defined element in the form of a string from an enumerated set, for example: guaranteed-small or best-effort-large Specifies the name of the VirtualMachineClass that describes the virtual hardware settings to be used each node in the pool. This controls the hardware available to the node (CPU and memory) as well as the requests and limits on those resources. See Virtual Machine Class Types for Tanzu Kubernetes Clusters.
storageClass node-storage (for example) Identifies the storage class to be used for storage of the disks that store the root file systems of the worker nodes. Run kubectl describe ns on the namespace to list available storage classes. The available storage classes for the namespace depend on the storage set by the vSphere administrator. Storage classes associated with the Supervisor Namespace are replicated in the cluster. In other words, the storage class must be available on the Supervisor Namespace to be valid.
distribution Not applicable Indicates the distribution for the cluster: the Tanzu Kubernetes cluster software installed on the control plane and worker nodes, including Kubernetes itself.
version Alphanumeric string with dashes representing the Kubernetes version, for example: v1.16.6+vmware.1-tkg.1 or v1.16.6 or v1.16 Specifies the software version of the Kubernetes distribution to install on cluster nodes using semantic version notation. Can specify the fully qualified version or use version shortcuts, such as "version: v1.16.6", which is resolved to the most recent image matching that patch version, or "version: v1.16", which is resolved to the most recent matching patch version. The resolved version displays as the "fullVersion" on the cluster description after you have created it.
settings Not applicable Identifies optional runtime configuration information for the cluster, including node network details and persistent storage for pods.
network Not applicable Specifies network-related settings for the cluster.
cni Not applicable Identifies the Container Networking Interface (CNI) plug-in for the cluster. The default is Calico.
name calico Specifies the CNI to use. Currently only Calico is supported. Any other value is not valid.
services Not applicable Identifies network settings for Kubernetes services. Default is 10.96.0.0/12.
cidrBlocks ["198.51.100.0/12"] (for example) Specifies a range of IP addresses to use for Kubernetes services. Default is 10.96.0.0/12. Must not overlap with the settings chosen for the Supervisor Cluster. Although this field is an array, allowing for multiple ranges, Calico only supports a single range, and Calico is the only supported CNI currently.
pods Not applicable Specifies network settings for pods. Default is 192.168.0.0/16.
cidrBlocks ["192.0.2.0/16"] (for example) Specifies a range of IP addresses to use for Kubernetes pods. Default is 192.168.0.0/16. Must not overlap with the settings chosen for the Supervisor Cluster. Although this field is an array, allowing for multiple ranges, Calico only supports a single range, and Calico is the only supported CNI currently.
serviceDomain "cluster.local" Specifies the service domain for the cluster. Default is cluster.local.
storage Not applicable Identifies persistent volume (PV) storage entries for container workloads.
classes Array of one or more user-defined strings, for example: ["gold", "silver"] Specifies named persistent volume (PV) storage classes for container workloads. Storage classes associated with the Supervisor Namespace are replicated in the cluster. In other words, the storage class must be available on the Supervisor Namespace to be a valid value.
defaultClass silver (for example) Specifies a named storage class to be annotated as the default in the cluster. If you do not specify it, there is no default. You do not have to specify one or more classes to specify a defaultClass.