Configure the vSphere Namespace where you plan to provision Tanzu Kubernetes clusters by associating the namespace with the content library for Tanzu Kubernetes releases and with the VM classes you want to use.

Prerequisites

Create a vSphere Namespace. See Create and Configure a vSphere Namespace.

Create a content library for hosting Tanzu Kubernetes releases. See Create, Secure, and Synchronize a Subscribed Content Library for Tanzu Kubernetes releases or Create, Secure, and Synchronize a Local Content Library for Tanzu Kubernetes releases.

Associate the Content Library with the vSphere Namespace

To associate the content library created for Tanzu Kubernetes releases with a vSphere Namespace, log in to the vCenter Server using the vSphere Client and complete either of the following procedures.
Associate Using the vSphere Inventory Path Associate Using the Workload Management Path
  1. Select Menu > Hosts and Clusters.
  2. Select the vSphere Cluster where Workload Management is enabled.
  3. Select the Configure tab.
  4. Select Namespaces > General.
  5. Select Tanzu Kubernetes Grid Service Configuration.
  6. Click Edit beside the Content Library label.
  7. Select the content library for Tanzu Kubernetes releases.
  8. Click OK.
  1. Select Menu > Workload Management.
  2. Select the Namespaces tab.
  3. Select the target vSphere Namespace.
  4. Locate the Tanzu Kubernetes Grid Service tile.
  5. Click Edit beside the Content Library label.
  6. Select the content library for Tanzu Kubernetes releases.
  7. Click OK.
Note: After you associate the content library with the vSphere Namespace, it can take several minutes for the virtual machine templates to be available for provisioning Tanzu Kubernetes clusters. See Verify the vSphere Namespace Configuration.

Associate the VM Classes with the vSphere Namespace

vSphere with Tanzu provides several default virtual machine classes, and you can create your own. See Virtual Machine Classes for Tanzu Kubernetes Clusters.

To provision Tanzu Kubernetes clusters, you need to associate the virtual machine classes you want to use with each vSphere Namespace where you want to provision Tanzu Kubernetes clusters.

To associate the default VM classes with a vSphere Namespace, log in to the vCenter Server using the vSphere Client and complete the following procedure.
  1. Select Menu > Workload Management.
  2. Select the Namespaces tab.
  3. Select the target vSphere Namespace where you plan to provision Tanzu Kubernetes clusters.
  4. Locate the VM Service tile.
  5. Click the Add VM Class link.
  6. Select the VM classes to add.
    1. To add the default VM classes, select the checkbox in the table header on page 1 of the list, navigate to page 2 and select the checkbox in the table header on that page. Verify that all classes are selected.
    2. To create a custom class, click Create New VM Class. See Create a VM Class in vSphere with Tanzu.
  7. Click OK to complete the operation.
  8. Confirm that the classes are added. The VM Service tile shows Manage VM Classes.
Note: The content library referenced in the VM Service tile is for use with standalone VMs, not Tanzu Kubernetes releases. See Creating and Managing Content Libraries for Stand-Alone VMs in vSphere with Tanzu.

Verify the vSphere Namespace Configuration

Once you have associated the content library and virtual machine classes with the vSphere Namespace, log in to the Supervisor Cluster and verify that each synchronized Tanzu Kubernetes release is available and each selected VM class is available.
  1. Install the Kubernetes CLI Tools for vSphere. See Download and Install the Kubernetes CLI Tools for vSphere.
  2. Log in to the Supervisor Cluster.
    kubectl vsphere login --server IP-ADDRESS-SUPERVISOR-CLUSTER --vsphere-username VCENTER-SSO-USERNAME
  3. Switch context to the target vSphere Namespace.
    kubectl config use-context SUPERVISOR-NAMESPACE
  4. List and describe the available Tanzu Kubernetes releases.
    kubectl get tanzukubernetesreleases
    kubectl describe tanzukubernetesreleases
  5. List the available virtual machine classes.
    kubectl get virtualmachineclassbindings
Once the namespace is configured, you can now provision Tanzu Kubernetes clusters. See Workflow for Provisioning Tanzu Kubernetes Clusters Using the TKGS v1alpha2 API. If you are using a local content library, you will need to specify an OVA that you uploaded to the library. See Examples for Provisioning Tanzu Kubernetes Clusters Using the Tanzu Kubernetes Grid Service v1alpha1 API.