Before you enable vSphere IaaS control plane, you must set up the storage to provision the Kubernetes infrastructure. You achieve this task by creating storage policies to be used in the Supervisor and namespaces.

To automate the creation of a tag-based storage policy, use the VMware® vSphere Management SDK. For more information about how to create a tag-based storage policy through the Web Services API, see the VMware Storage Policy SDK Programming Guide and vSphere Web Services SDK Programming Guide documentations.

Optionally, you can use the vSphere Automation REST APIs to create and add a tag to the datastore. See the vSphere Tag Service chapter. Currently, you can create a tag-based storage policy only through the Web Services APIs.

Use the vSphere Automation REST APIs to retrieve the default storage policy of a specific datastore by using the GET https://<vcenter_ip_address_or_fqdn>/api/vcenter/datastore/datastore_id/default-policy request and submitting the ID of the datastore as a path parameter. You can also retrieve commonly used information about the storage policies available in the vCenter Server instance by using the GET https://<vcenter_ip_address_or_fqdn>/api/vcenter/compute/policies request.

You can use the storage policies retrieved through the vSphere Automation APIs to perform the following tasks:

  • Assign the storage policies to the Supervisor. The storage policies set within the Supervisor enable specification ensure that the Supervisor control plane, the ephemeral disks of all vSphere Pods, and the container images are placed on the datastores that the policies represent. See Configuring NSX for vSphere IaaS control plane.

  • Assign the storage policies to the vSphere Namespace. The storage policies associated with a namespace determine which datastores the namespace can access and use for persistent volumes for the vSphere Pod and the pods inside a Tanzu Kubernetes cluster. See Create a vSphere Namespace.