To create a Tanzu Kubernetes Grid (TKGm) cluster using VMware Cloud Director Container Service Extension client, it is necessary to generate a cluster configuration file and use the cluster apply command.

Procedure

  1. To generate the TKGm cluster configuration file, open vcd-cse and enter the following command:
    vcd cse cluster apply -s --tkg
    The following code is an example of a TKGm cluster configuration yaml file:
    apiVersion: cse.vmware.com/v2.1
    kind: TKGm
    metadata:
      name: tkgm1
      orgName: org1
      site: https://vcd.com
      virtualDataCenterName: ovdc1
    spec:
      distribution:
        templateName: ubuntu-2004-kube-v1.21.8+vmware.1-tkg.2-ed3c93616a02968be452fe1934a1d37c
        templateRevision: 1
      settings:
        network:
          expose: true
        ovdcNetwork: ovdc1_nw
        rollbackOnFailure: true
        sshKey: 'ssh-key'
        csi:
        - defaultK8sStorageClass:
            filesystem: ext4
            k8sStorageClassName: my-storage-class
            useDeleteReclaimPolicy: true
            vcdStorageProfileName: '*'
      topology:
        controlPlane:
          count: 1
          storageProfile: '*'
        workers:
          count: 1
          storageProfile: '*'
  2. To create a TKGm cluster, enter the following command in vcd cse:
    vcd cse cluster apply <tkgm_cluster.yaml>

Results

Your TKGm cluster is created.

If you want to scale up worker nodes, you can use the following commands in vcd cse:
vcd cse cluster apply <resize_cluster.yaml> (resizes the specification on the resource specified). 
Note: TKGm clusters do not support scaling down worker nodes, scaling NFS nodes or upgrades.