Follow this workflow to provision a v1beta1 TKG cluster using the Tanzu CLI.

Prerequisites

Verify or complete the following prerequisites before starting the provisioning workflow:

Provision a Default TKG Cluster

Complete these steps to provision a default v1beta1 Cluster using the Tanzu CLI. For additional guidance or troubleshooting, see Create Workload Clusters in the standalone TKG documentation.
  1. Install the Tanzu CLI.

    See Install the Tanzu CLI for Use with TKG Service Clusters.

  2. Connect to Supervisor using the Tanzu CLI.
  3. List the available TKrs.
    tanzu kubernetes-release get
  4. Create a Cluster manifest with the desired configurations.

    With TKG on vSphere 8 Supervisor, you can use a Kubernetes-style object specification with the Tanzu CLI to create a Cluster based on a ClusterClass.

    1. Start with the v1beta1 Example: Default Cluster.
    2. Populate spec.clusterNetwork with the required cidrBlocks.
    3. Populate spec.topology with the expected values listed in the table.
      • TKR NAME string, such as v1.26.13---vmware.1-fips.1-tkg.3
      • Number of control plane nodes, such as 3
      • Name of each worker node pool, such as node-pool-1
      • Number of worker nodes, such as 3
      • VM class, such as guaranteed-medium
      • Storage class, such as tkg2-storage-policy
  5. Save the Cluster manifest as cluster-default.yaml and validate it using a YAML checker.
  6. Create the TKG cluster.
    tanzu cluster create -f cluster-default.yaml
    Note: Append -v 8 for verbose output.
  7. Verify that the TKG cluster is created.
    Workload cluster 'cluster-default' created
  8. After the cluster is created, run the following command to check the status of the cluster.
    tanzu cluster get cluster-default
  9. List the cluster.
    tanzu cluster list
  10. Check cluster nodes.
    tanzu cluster machinehealthcheck node get cluster-default
    tanzu cluster machinehealthcheck control-plane get cluster-default
  11. Get the configuration context for the TKG cluster.
    tanzu cluster kubeconfig get cluster-default -n tkg2-cluster-ns
  12. Access the cluster.
    kubectl config use-context tanzu-cli-cluster-default@cluster-default
  13. Exercise the TKG 2.0 cluster by deploying a test pod and verify that it works as expected.

    See Test TKG Cluster Provisioning Using Kubectl.

Provision a Custom TKG Cluster on Supervisor

To provision a custom v1beta1 Cluster, such as v1beta1 Example: Cluster with Calico CNI, you can put all the specs into a single YAML as provided in the example, change certain values to match your environment, and run kubectl apply -f cluster-calico.yaml, for example.

To provision the same custom v1beta1 Cluster using the Tanzu CLI, the configuration objects CalicoConfig and ClusterBootstrap should exist before you create the cluster.

To provision the Cluster with Calico CNI:
  1. Create the YAML for the CalicoConfig and ClusterBootstrap configuration objects, with the desired cluster name and namespace in each.
  2. Run kubectl apply -f for each of the three configuration objects, or put them into a single YAML and run kubectl apply -f.
  3. Create the Cluster spec cluster-calico.yaml, with the name and namespace matching those in the configuration objects, and any other desired parameters.
  4. Create the cluster.
    tanzu cluster create -f cluster-calico.yaml