This section describes information about deploying vSphere Container Storage Plug-in on Windows.

Guidelines and Requirements

Your environment must meet general requirements that apply to vSphere Container Storage Plug-in. For more information, see Preparing for Installation of vSphere Container Storage Plug-in.

In addition, follow these requirements to deploy vSphere Container Storage Plug-in with Windows.
  • Kubernetes version 1.20 or higher.
  • vSphere Container Storage Plug-in version 3.0.0 or later.
  • CSI Proxy v1. Install CSI Proxy on all Windows nodes. For more information, see
  • Control plane node run on Linux.
  • Worker nodes must have Windows Server 2019. Other versions of Windows Server are not supported. Windows worker nodes is supported on the following builds.
    • Windows-ltsc2022
    • Windows-20h2
    • Windows-1809
  • Containerd version must be 1.5 or higher if you use it in nodes. For more information, see containerd fails to add a disk mount on Windows.

Enable vSphere Container Storage Plug-in with Windows Nodes

Enable vSphere Container Storage Plug-in using Windows nodes on the Kubernetes cluster.

Note: When a pod is created and the volume does not have a filesystem created on it, the filesystem type supplied from the StorageClass is ignored and the volume gets formatted with the NTFS file system.


  1. Install vSphere Container Storage Plug-in version 3.0.0.
  2. Verify that the Windows daemonset is available.
    $ kubectl get daemonsets vsphere-csi-node-windows --namespace=vmware-system-csi
    NAME                       DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR              AGE
    vsphere-csi-node-windows   1         1         1       1            1    7m10s
  3. Create a storage class.
    1. Define a StorageClass example-windows-sc.yaml.
      kind: StorageClass
        name: example-windows-sc
      allowVolumeExpansion: true  # Optional: only applicable to vSphere 7.0U1 and above
        storagepolicyname: "vSAN Default Storage Policy"  # Optional Parameter
        #datastoreurl: "ds:///vmfs/volumes/vsan:52cdfa80721ff516-ea1e993113acfc77/"  # Optional Parameter "ntfs"  # Optional Parameter
      Note: is an optional parameter. Using Windows file system, you can only set ntfs as its value since vSphere Container Storage Plug-in only supports NTFS file system on Windows nodes.
    2. Define a PersistentVolumeClaim request example-windows-pvc.yaml.
      apiVersion: v1
      kind: PersistentVolumeClaim
        name: example-windows-pvc
          - ReadWriteOnce
            storage: 5Gi
        storageClassName: example-windows-sc
        volumeMode: Filesystem
      Note: The pvc definition for Windows is the same as for Linux. You can specify only ReadWriteOnce as access modes.
    3. Import the PersistentVolumeClaim into Vanilla Kubernetes cluster:
      kubectl create -f example-windows-pvc.yaml
    4. Verify that the PersistentVolume is created successfully.
      The Status must display as Bound.
      $ kubectl describe pvc example-windows-pvc
      Name:          example-windows-pvc
      Namespace:     default
      StorageClass:  example-windows-sc
      Status:        Bound
      Volume:        pvc-e64e0716-ff63-47b8-8ee4-d1eb4f86dcd7
      Labels:        <none>
      Annotations: yes
      Finalizers:    []
      Capacity:      5Gi
      Access Modes:  RWO
      VolumeMode:    Filesystem
      Used By:       example-windows-pod
      Events:        <none>
    5. Create a Windows pod specification example-windows-pod.yaml.
      In the specification, reference the example-windows-pvc that you created earlier.
      apiVersion: v1
      kind: Pod
        name: example-windows-pod
          - name: test-container
              - "powershell.exe"
              - "-Command"
              - "while (1) { Add-Content -Encoding Ascii C:\\test\\data.txt $(Get-Date -Format u); sleep 1 }"
              - name: test-volume
                mountPath: "/test/"
                readOnly: false
          - name: test-volume
              claimName: example-windows-pvc
    6. Create the pod.
      kubectl create -f example-windows-pod.yaml
    7. Verify that the pod is created successfully.
      $ kubectl get pod example-windows-pod
      NAME                  READY   STATUS    RESTARTS   AGE
      example-windows-pod   1/1     Running   0          4m13s

      In the above example, example-windows-pvc is formatted as NTFS file system and is mounted to C:\test directory.