Before you enable vSphere IaaS control plane, create storage policies to be used in the Supervisor and namespaces. The policies represent datastores and manage storage placement of such components and objects as Supervisor control plane VMs, vSphere Podephemeral disks, and container images. You might also need policies for storage placement of persistent volumes and VM content libraries. If you use TKG clusters, the storage policies also dictate how the TKG cluster nodes are deployed.
Depending on your vSphere storage environment and the needs of DevOps, you can create several storage policies for 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 datastore types.
Storage policies that you create for a namespace in a three-zone Supervisor must be topology aware and have the consumption domain enabled in Step 4b. The three-zone namespace prevents you from assigning storage policies that are not topology aware.
The following example creates the storage policy for the datastore tagged as Gold.
Prerequisites
- Be familiar with information about storage policies in vSphere IaaS control plane, see About Storage Policies in vSphere IaaS Control Plane Concepts and Planning.
- If you use vSAN Data Persistence platform for persistent storage and need to create custom storage policies for vSAN Direct or vSAN SNA datastores, see Creating Custom Storage Policies for vSAN Data Persistence Platform in vSphere IaaS Control Plane Services and Workloads.
- If you need to create topology aware storage policies to use for persistent storage in a three-zone Supervisor, be familiar with the guidelines in Using Persistent Storage on a Three-Zone Supervisor in vSphere IaaS Control Plane Services and Workloads.
- Make sure that the datastore you reference in the storage policy is shared between all ESXi hosts in the cluster. Any shared datastores in your environment are supported, including VMFS, NFS, vSAN, or vVols.
- 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. The storage policies configured on the Supervisor ensure that the control plane VMs, pod ephemeral disks, and container images are placed on the datastores that the policies represent.
- 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 TKG cluster on this namespace. DevOps engineers can use the storage classes in their persistent volume claim specifications. See Create and Configure a vSphere Namespace.