Tanzu User Guide: Creating A Tanzu Kubernetes Guest Cluster
This sample YAML file can be copied and bolded items must be modified for usage in your own environment.
apiVersion: run.tanzu.vmware.com/v1alpha1 #tkg api endpoint
kind: TanzuKubernetesCluster #required parameter
metadata:
name: tkc-118 #cluster name, user defined
namespace: kg-ns1 #supervisor namespace
spec:
distribution:
version: v1.18 #resolved kubernetes version
topology:
controlPlane:
count: 3 #number of master nodes
class: guaranteed-medium (1) #vmclass for master nodes
storageClass: cns-vmfs (2) #storageclass for master nodes
workers:
count: 3 #number of worker nodes
class: guaranteed-medium (1) #vmclass for worker nodes
storageClass: cns-vmfs (2) #storageclass for worker nodes
- You can use the command
kubectl get virtualmachineclasses
to see what classes are available to you to use within your Namespace. - You can use the command
kubectl get sc
to see what storageclasses are available to use within your Namespace. Please note that as of this documentation release in June of 2021, it is required to use a VMFS datastore to deploy the Tanzu Kubernetes Guest Cluster nodes to.
The below demo video shows how to create a Tanzu Kubernetes Cluster with the FlashArray using the YAML file above.