Before you enable vSphere with Tanzu, create storage policies to be used in the Supervisor Cluster and namespaces. The policies represent datastores available in the vSphere environment. They control the storage placement of such objects as control plane VMs, pod ephemeral disks, container images, and persistent storage volumes. If you use Tanzu Kubernetes clusters, the storage policies also dictate how the Tanzu Kubernetes cluster nodes are deployed.
Depending on your vSphere storage environment and the needs of DevOps, you can create several storage policies to represent different classes of storage. For example, if your vSphere storage environment has three classes of datastores, Bronze, Silver, and Gold, you can create storage policies for all datastores. You can then use the Bronze datastore for ephemeral and container image virtual disks, and use the Silver and Gold datastores for persistent volume virtual disks. For more information about storage policies, see the Storage Policy Based Management chapter in the vSphere Storage documentation.
The following example creates the storage policy for the datastore tagged as Gold.
If you use vSAN Data Persistence platform you can create storage policies for vSAN Direct or vSAN SNA datastores. For information, see Create vSAN Direct Storage Policy and Create vSAN SNA Storage Policy.
Prerequisites
- Make sure that the datastore you reference in the storage policy is shared between all ESXi hosts in the cluster.
- Required privileges: and .
Procedure
Results
The new storage policy for the datastore tagged as Gold appears on the list of existing storage policies.
What to do next
- Assign the storage policies to the Supervisor Cluster. The storage policies configured on the Supervisor Cluster ensure that the control plane VMs, pod ephemeral disks, and container images are placed on the datastores that the policies represent. See Enable Workload Management with NSX Networking.
- Assign the storage policies to the vSphere Namespace. Storage policies visible to the namespace determine which datastores the namespace can access and use for persistent volumes. The storage policies appear as matching Kubernetes storage classes in the namespace. They are also propagated to the Tanzu Kubernetes cluster on this namespace. DevOps engineers can use the storage classes in their persistent volume claim specifications. See Create and Configure a vSphere Namespace.