Storage policy for VM is mapped to datastores in the vSphere environment and used to determine the placement of Tanzu Kubernetes Grid objects like control plane nodes, pod ephemeral disks, container images, persistent storage volumes, and nodes.

VMware vSAN creates the vSAN Default Storage Policy. The default policy can be used, or a new storage policy can be created.

Procedure

  1. Configure your storage policy with VMware vSAN.
    1. Log in to the vSphere Client with admin privileges.
    2. Select Home > Policies and Profiles > VM Storage Policies.
    3. From the drop-down menu, select the vSAN default storage policy.
    4. Select Home > Storage > <datastore_name> and validate that the datastore has the storage policy assigned.
  2. Configure your storage policy with VMFS or NFS datastore.
    1. Log in to the vSphere Client with admin privileges.
    2. Select Storage > <datastore_name>.
    3. Right-click the <datastore_name>.
    4. From the drop-down menu, select Tags & Custom Attributes > Assign Tag.
    5. Click Add Tag.
    6. Complete the Tag details.
      Option Description
      Name and Description Assign a tag name and enter tag-specific notes.
      Category Click Create New Category and add the category name.

      For example, Kubernetes Storage

    7. Select the newly created tag and click Assign.
    8. Select Home > Policies and Profiles > VM Storage Policies and click Create.
    9. Complete the VM storage policy details.
      Option Description
      Name and Description

      Assign a storage name and specify that it is used by, for example, Tanzu Kubernetes Grid.

      Do not use any special characters in the VM Storage Policy name so that it is mapped properly to Tanzu Kubernetes Grid.

      Policy structure In the Datastore specific rules section, click Enable tag-based placement rules.
      Tag based placement Assign the newly created tag category name.

      Set the usage option to Use storage tagged with.

      Navigate to the newly created tag and select the tag name.

      Storage compatibility The newly created storage tag appears compatible because it is associated with a specific datastore.
    10. Click Next.
    11. Review the storage policy details and click Finish.