The vSphere storage object that will back a Kubernetes containerized application should meet specific storage requirements. As a vSphere user, you create a VM storage policy based on the requirements given by the Kubernetes user.

The storage policy will be associated with the virtual disk or vSAN file share that back the Kubernetes container.

If you have multiple vCenter Server instances in your environment, create the VM storage policy on each instance. Use the same policy name across all instances.

If you want to create a storage policy for a datastore other than vSAN, see Creating and Managing vSphere VM Storage Policies. To use thick provisioning on a VMFS datastore, make sure to select an appropriate option in the Volume allocation drop-down menu when you define the policy.

For information about types of datastores that Cloud Native Storage supports and which datastores support thick provisioning, see vSphere Functionality Supported by vSphere Container Storage Plug-in in Getting Started with VMware vSphere Container Storage Plug-in.

Prerequisites

  • The Kubernetes user identifies the Kubernetes cluster where the stateful containerized application will be deployed.
  • The Kubernetes user collects storage requirements for the containerized application and communicates them to the vSphere user.
  • Required privileges: VM storage policies. Update and VM storage policies. View.

Procedure

  1. In the vSphere Client, open the Create VM Storage Policy wizard.
    1. Click Menu > Policies and Profiles.
    2. Under Policies and Profiles, click VM Storage Policies.
    3. Click Create.
  2. Enter the policy name and description, and click Next.
    Option Action
    vCenter Server Select the vCenter Server instance.
    Name Enter the name of the storage policy, for example Space-Efficient.
    Description Enter the description of the storage policy.
  3. On the Policy structure page under Datastore-specific rules, select Enable rules for vSAN storage and click Next.
  4. On the vSAN page, define the policy rule set and click Next.
    1. On the Availability tab, define the Site disaster tolerance and Failures to tolerate.
    2. On the Advanced Policy Rules tab, define advanced policy rules, such as number of disk stripes per object and flash read cache reservation.
  5. On the Storage compatibility page, review the list of vSAN datastores that match this policy and click Next.
  6. On the Review and finish page, review the policy settings, and click Finish.
    Review and finish page shows settings for Kubernetes storage policy.

What to do next

You can now inform the Kubernetes user of the storage policy name. The VM storage policy you created will be used as a part of storage class definition for dynamic volume provisioning.